Package net.pl3x.map.core.registry
Class IconRegistry
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class net.pl3x.map.core.registry.Registry
entrySet, get, getOrDefault, has, iterator, register, size, unregister, unregister, values
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
IconRegistry
public IconRegistry()
-
-
Method Details
-
init
public void init()Create a new image registry. -
getDir
Get the directory where registered icon images are stored.- Returns:
- icons directory
-
register
Register a new image.Will return null if the image is already registered.
- Overrides:
register
in classRegistry<IconImage>
- Parameters:
image
- image to register or null- Returns:
- registered image
- Throws:
IllegalStateException
- if image failed to save to disk
-