| Package | Description |
|---|---|
| me.lucko.helper.event.filter | |
| me.lucko.helper.menu | |
| me.lucko.helper.metadata | |
| me.lucko.helper.metadata.type |
| Modifier and Type | Method and Description |
|---|---|
static <T extends org.bukkit.event.entity.EntityEvent> |
EventFilters.entityHasMetadata(MetadataKey<?> key)
Returns a predicate which only returns true if the entity has a given metadata key
|
static <T extends org.bukkit.event.player.PlayerEvent> |
EventFilters.playerHasMetadata(MetadataKey<?> key)
Returns a predicate which only returns true if the player has a given metadata key
|
| Modifier and Type | Field and Description |
|---|---|
static MetadataKey<Gui> |
Gui.OPEN_GUI_KEY |
| Modifier and Type | Method and Description |
|---|---|
static <T> MetadataKey<T> |
MetadataKey.create(String id,
Class<T> clazz)
Creates a MetadataKey with the given id and type
|
static <T> MetadataKey<T> |
MetadataKey.create(String id,
com.google.common.reflect.TypeToken<T> type)
Creates a MetadataKey with the given id and type
|
static MetadataKey<Boolean> |
MetadataKey.createBooleanKey(String id) |
static MetadataKey<Character> |
MetadataKey.createCharacterKey(String id) |
static MetadataKey<Cooldown> |
MetadataKey.createCooldownKey(String id) |
static MetadataKey<Double> |
MetadataKey.createDoubleKey(String id) |
static MetadataKey<Empty> |
MetadataKey.createEmptyKey(String id) |
static MetadataKey<Float> |
MetadataKey.createFloatKey(String id) |
static MetadataKey<Integer> |
MetadataKey.createIntegerKey(String id) |
static MetadataKey<Long> |
MetadataKey.createLongKey(String id) |
static MetadataKey<Short> |
MetadataKey.createShortKey(String id) |
static MetadataKey<String> |
MetadataKey.createStringKey(String id) |
static MetadataKey<UUID> |
MetadataKey.createUuidKey(String id) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.ImmutableMap<MetadataKey<?>,Object> |
MetadataMap.asMap()
Returns an immutable view of the backing map
|
| Modifier and Type | Method and Description |
|---|---|
<T> void |
MetadataMap.forcePut(MetadataKey<T> key,
T value)
Adds a metadata key and corresponding value into this map, removing any previous value if present.
|
<T> void |
MetadataMap.forcePut(MetadataKey<T> key,
TransientValue<T> value)
Adds a metadata key and corresponding value into this map, removing any previous value if present.
|
<T> Optional<T> |
MetadataMap.get(MetadataKey<T> key)
Gets an optional value for the given key.
|
<T> T |
MetadataMap.getOrDefault(MetadataKey<T> key,
T def)
Gets a value for the given key, or returns the default if one isn't present.
|
<T> T |
MetadataMap.getOrNull(MetadataKey<T> key)
Gets a value for the given key, or null if one isn't present.
|
<T> T |
MetadataMap.getOrPut(MetadataKey<T> key,
Supplier<? extends T> def)
Gets a value for the given key, or puts and returns the default if one isn't present.
|
<T> T |
MetadataMap.getOrPutExpiring(MetadataKey<T> key,
Supplier<? extends TransientValue<T>> def)
Gets a value for the given key, or puts and returns the default if one isn't present.
|
boolean |
MetadataMap.has(MetadataKey<?> key)
Returns if this map contains the given key, and the types of each key match.
|
<T> boolean |
MetadataMap.ifPresent(MetadataKey<T> key,
Consumer<? super T> action)
Attempts to get a value for the given key, and applies the action is present.
|
static <T> Map<BlockPosition,T> |
Metadata.lookupBlocksWithKey(MetadataKey<T> key) |
static <T> Map<org.bukkit.entity.Entity,T> |
Metadata.lookupEntitiesWithKey(MetadataKey<T> key) |
static <T> Map<org.bukkit.entity.Player,T> |
Metadata.lookupPlayersWithKey(MetadataKey<T> key) |
static <T> Map<org.bukkit.World,T> |
Metadata.lookupWorldsWithKey(MetadataKey<T> key) |
<T> void |
MetadataMap.put(MetadataKey<T> key,
T value)
Adds a metadata key and corresponding value into this map, removing any previous value if present.
|
<T> void |
MetadataMap.put(MetadataKey<T> key,
TransientValue<T> value)
Adds a metadata key and corresponding value into this map, removing any previous value if present.
|
<T> boolean |
MetadataMap.putIfAbsent(MetadataKey<T> key,
T value)
Adds a metadata key and corresponding value into this map, only if an existing key is not present.
|
<T> boolean |
MetadataMap.putIfAbsent(MetadataKey<T> key,
TransientValue<T> value)
Adds a metadata key and corresponding value into this map, only if an existing key is not present.
|
boolean |
MetadataMap.remove(MetadataKey<?> key)
Removes the given key from this map
|
| Modifier and Type | Method and Description |
|---|---|
<K> Map<BlockPosition,K> |
BlockMetadataRegistry.getAllWithKey(MetadataKey<K> key)
Gets a map of the blocks with a given metadata key
|
<K> Map<org.bukkit.entity.Player,K> |
PlayerMetadataRegistry.getAllWithKey(MetadataKey<K> key)
Gets a map of the players with a given metadata key
|
<K> Map<org.bukkit.World,K> |
WorldMetadataRegistry.getAllWithKey(MetadataKey<K> key)
Gets a map of the worlds with a given metadata key
|
<K> Map<org.bukkit.entity.Entity,K> |
EntityMetadataRegistry.getAllWithKey(MetadataKey<K> key)
Gets a map of the entities with a given metadata key
|
Copyright © 2022. All rights reserved.