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>
HOME
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
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @Nullable MemoryKey
getByKey(@NotNull NamespacedKey namespacedKey)
Returns aMemoryKey
by aNamespacedKey
.@NotNull NamespacedKey
getKey()
Return the namespaced identifier for this object.@NotNull Class<T>
getMemoryClass()
Gets the class of values associated with this memory.static @NotNull Set<MemoryKey>
values()
Returns the set of all MemoryKeys.
-
-
-
Method Detail
-
getKey
@NotNull public @NotNull NamespacedKey getKey()
Description copied from interface:Keyed
Return the namespaced identifier for this object.
-
getMemoryClass
@NotNull public @NotNull Class<T> getMemoryClass()
Gets the class of values associated with this memory.- Returns:
- the class of value objects
-
getByKey
@Nullable public static @Nullable MemoryKey getByKey(@NotNull @NotNull NamespacedKey namespacedKey)
Returns aMemoryKey
by aNamespacedKey
.- Parameters:
namespacedKey
- theNamespacedKey
referencing aMemoryKey
- Returns:
- the
MemoryKey
or null when noMemoryKey
is available under that key
-
-