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,- RegistryAware
Represents a key used for accessing memory values of a
 
LivingEntity.- 
Field SummaryFieldsModifier and TypeFieldDescription
- 
Method SummaryModifier and TypeMethodDescriptionstatic MemoryKeygetByKey(NamespacedKey namespacedKey) Returns aMemoryKeyby aNamespacedKey.getKey()Deprecated.Gets the key of this instance if it is registered otherwise returnsnull.Gets the key of this instance if it is registered otherwise throws an error.Gets the class of values associated with this memory.booleanReturns whether this instance is register in a registry and therefore has a key or not.values()Returns the set of all MemoryKeys.
- 
Field Details- 
HOME
- 
POTENTIAL_JOB_SITE
- 
JOB_SITE
- 
MEETING_POINT
- 
GOLEM_DETECTED_RECENTLY
- 
LAST_SLEPT
- 
LAST_WOKEN
- 
LAST_WORKED_AT_POI
- 
UNIVERSAL_ANGER
- 
ANGRY_AT
- 
ADMIRING_ITEM
- 
ADMIRING_DISABLED
- 
HUNTED_RECENTLY
- 
PLAY_DEAD_TICKS
- 
TEMPTATION_COOLDOWN_TICKS
- 
IS_TEMPTED
- 
LONG_JUMP_COOLING_DOWN
- 
HAS_HUNTING_COOLDOWN
- 
RAM_COOLDOWN_TICKS
- 
LIKED_PLAYER
- 
LIKED_NOTEBLOCK_POSITION
- 
LIKED_NOTEBLOCK_COOLDOWN_TICKS
- 
ITEM_PICKUP_COOLDOWN_TICKS
- 
SNIFFER_EXPLORED_POSITIONS
 
- 
- 
Method Details- 
getKeyOrThrowDescription copied from interface:RegistryAwareGets the key of this instance if it is registered otherwise throws an error.
 This is a convenience method and plugins should always checkRegistryAware.isRegistered()before using this method.- Specified by:
- getKeyOrThrowin interface- RegistryAware
- Returns:
- the key with which this instance is registered.
- See Also:
 
- 
getKeyOrNullDescription copied from interface:RegistryAwareGets the key of this instance if it is registered otherwise returnsnull.- Specified by:
- getKeyOrNullin interface- RegistryAware
- Returns:
- the key with which this instance is registered or nullif not registered.
- See Also:
 
- 
isRegisteredpublic boolean isRegistered()Description copied from interface:RegistryAwareReturns whether this instance is register in a registry and therefore has a key or not.- Specified by:
- isRegisteredin interface- RegistryAware
- Returns:
- true, if this instance is registered. Otherwise, false.
- See Also:
 
- 
getKeyDeprecated.A key might not always be present, usegetKeyOrThrow()instead.Return the namespaced identifier for this object.
- 
getMemoryClassGets the class of values associated with this memory.- Returns:
- the class of value objects
 
- 
getByKeyReturns aMemoryKeyby aNamespacedKey.- Parameters:
- namespacedKey- the- NamespacedKeyreferencing a- MemoryKey
- Returns:
- the MemoryKeyor null when noMemoryKeyis available under that key
 
- 
valuesReturns the set of all MemoryKeys.- Returns:
- the memoryKeys
 
 
- 
getKeyOrThrow()instead.