public interface KeysManager
Modifier and Type | Method and Description |
---|---|
<V> KeyMap<V> |
createKeyMap(java.util.function.Supplier<java.util.Map<java.lang.String,V>> mapCreator)
|
<V> KeyMap<V> |
createKeyMap(java.util.function.Supplier<java.util.Map<java.lang.String,V>> mapCreator,
java.util.Map<Key,V> map)
Create a new
KeyMap instance from the given map. |
KeySet |
createKeySet(java.util.function.Supplier<java.util.Set<java.lang.String>> setCreator)
Create a new empty
KeySet instance. |
KeySet |
createKeySet(java.util.function.Supplier<java.util.Set<java.lang.String>> setCreator,
java.util.Collection<Key> collection)
Create a new
KeySet instance from the given collection. |
Key |
getKey(org.bukkit.block.Block block)
Get the key of a block.
|
Key |
getKey(org.bukkit.block.BlockState blockState)
Get the key of a block-state.
|
Key |
getKey(org.bukkit.entity.Entity entity)
Get the key of an entity.
|
Key |
getKey(org.bukkit.entity.EntityType entityType)
Get the key of an entity type.
|
Key |
getKey(org.bukkit.inventory.ItemStack itemStack)
Get the key of an item-stack.
|
Key |
getKey(org.bukkit.Material material,
short data)
Get the key of a material and data.
|
Key |
getKey(java.lang.String key)
Get the key of a string.
|
Key |
getKey(java.lang.String globalKey,
java.lang.String subKey)
Get the key of a global-key and a sub-key.
|
Key getKey(org.bukkit.entity.EntityType entityType)
entityType
- The entity type to check.Key getKey(org.bukkit.entity.Entity entity)
entity
- The entity to check.Key getKey(org.bukkit.block.Block block)
block
- The block to check.Key getKey(org.bukkit.block.BlockState blockState)
blockState
- The block-state to check.Key getKey(org.bukkit.inventory.ItemStack itemStack)
itemStack
- The item-stack to check.Key getKey(org.bukkit.Material material, short data)
material
- The material to check.data
- The data to check.Key getKey(java.lang.String key)
key
- The string to check.Key getKey(java.lang.String globalKey, java.lang.String subKey)
globalKey
- The global keysubKey
- The sub keyKeySet createKeySet(java.util.function.Supplier<java.util.Set<java.lang.String>> setCreator)
KeySet
instance.KeySet createKeySet(java.util.function.Supplier<java.util.Set<java.lang.String>> setCreator, java.util.Collection<Key> collection)
KeySet
instance from the given collection.
If the provided collection is also a KeySet
, the exact same instance of that set is returned.
Otherwise, the returned KeySet
is a copy of that collection.collection
- The collection to create KeySet
from.<V> KeyMap<V> createKeyMap(java.util.function.Supplier<java.util.Map<java.lang.String,V>> mapCreator)
<V> KeyMap<V> createKeyMap(java.util.function.Supplier<java.util.Map<java.lang.String,V>> mapCreator, java.util.Map<Key,V> map)
KeyMap
instance from the given map.
If the provided map is also a KeyMap
, the exact same instance of the map is returned.
Otherwise, the returned KeyMap
is a copy of that map.map
- The map to create KeySet
from.