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 aLivingEntity.
-
-
Field Summary
Fields Modifier and Type Field Description static MemoryKey<Location>HOMEstatic MemoryKey<Location>JOB_SITEstatic MemoryKey<Long>LAST_SLEPTstatic MemoryKey<Long>LAST_WORKED_AT_POIstatic MemoryKey<Location>MEETING_POINT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MemoryKeygetByKey(NamespacedKey namespacedKey)Returns aMemoryKeyby aNamespacedKey.NamespacedKeygetKey()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.
-
-
-
Method Detail
-
getKey
@NotNull public NamespacedKey getKey()
Description copied from interface:KeyedReturn the namespaced identifier for this object.
-
getMemoryClass
@NotNull public Class<T> getMemoryClass()
Gets the class of values associated with this memory.- Returns:
- the class of value objects
-
getByKey
@Nullable public static MemoryKey getByKey(@NotNull NamespacedKey namespacedKey)
Returns aMemoryKeyby aNamespacedKey.- Parameters:
namespacedKey- theNamespacedKeyreferencing aMemoryKey- Returns:
- the
MemoryKeyor null when noMemoryKeyis available under that key
-
-