Package org.bukkit.entity.memory
Class MemoryKey<T>
java.lang.Object
org.bukkit.entity.memory.MemoryKey<T>
- Type Parameters:
T
- the class type of the memory value
- All Implemented Interfaces:
Keyed
public final class MemoryKey<T> extends Object implements Keyed
Represents a key used for accessing memory values of a
LivingEntity
.-
Field Summary
Fields Modifier and Type Field Description static MemoryKey<Boolean>
ADMIRING_DISABLED
static MemoryKey<Boolean>
ADMIRING_ITEM
static MemoryKey<UUID>
ANGRY_AT
static MemoryKey<Location>
HOME
static MemoryKey<Boolean>
HUNTED_RECENTLY
static MemoryKey<Location>
JOB_SITE
static MemoryKey<Long>
LAST_SLEPT
static MemoryKey<Long>
LAST_WOKEN
static MemoryKey<Long>
LAST_WORKED_AT_POI
static MemoryKey<Location>
MEETING_POINT
static MemoryKey<Location>
POTENTIAL_JOB_SITE
static MemoryKey<Boolean>
UNIVERSAL_ANGER
-
Method Summary
Modifier and Type Method Description static MemoryKey
getByKey(NamespacedKey namespacedKey)
Returns aMemoryKey
by aNamespacedKey
.NamespacedKey
getKey()
Return the namespaced identifier for this object.Class<T>
getMemoryClass()
Gets the class of values associated with this memory.static Set<MemoryKey>
values()
Returns the set of all MemoryKeys.
-
Field Details
-
Method Details
-
getKey
Description copied from interface:Keyed
Return the namespaced identifier for this object. -
getMemoryClass
Gets the class of values associated with this memory.- Returns:
- the class of value objects
-
getByKey
Returns aMemoryKey
by aNamespacedKey
.- Parameters:
namespacedKey
- theNamespacedKey
referencing aMemoryKey
- Returns:
- the
MemoryKey
or null when noMemoryKey
is available under that key
-
values
Returns the set of all MemoryKeys.- Returns:
- the memoryKeys
-