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:
  `net.kyori.adventure.key.Keyed`, `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 final MemoryKey<Boolean>`
`ADMIRING_DISABLED`
`static final MemoryKey<Boolean>`
`ADMIRING_ITEM`
`static final MemoryKey<UUID>`
`ANGRY_AT`
`static final MemoryKey<Boolean>`
`GOLEM_DETECTED_RECENTLY`
`static final MemoryKey<Boolean>`
`HAS_HUNTING_COOLDOWN`
`static final MemoryKey<Location>`
`HOME`
`static final MemoryKey<Boolean>`
`HUNTED_RECENTLY`
`static final MemoryKey<Boolean>`
`IS_TEMPTED`
`static final MemoryKey<Integer>`
`ITEM_PICKUP_COOLDOWN_TICKS`
`static final MemoryKey<Location>`
`JOB_SITE`
`static final MemoryKey<Long>`
`LAST_SLEPT`
`static final MemoryKey<Long>`
`LAST_WOKEN`
`static final MemoryKey<Long>`
`LAST_WORKED_AT_POI`
`static final MemoryKey<Integer>`
`LIKED_NOTEBLOCK_COOLDOWN_TICKS`
`static final MemoryKey<Location>`
`LIKED_NOTEBLOCK_POSITION`
`static final MemoryKey<UUID>`
`LIKED_PLAYER`
`static final MemoryKey<Integer>`
`LONG_JUMP_COOLING_DOWN`
`static final MemoryKey<Location>`
`MEETING_POINT`
`static final MemoryKey<Integer>`
`PLAY_DEAD_TICKS`
`static final MemoryKey<Location>`
`POTENTIAL_JOB_SITE`
`static final MemoryKey<Integer>`
`RAM_COOLDOWN_TICKS`
`static final MemoryKey<Integer>`
`TEMPTATION_COOLDOWN_TICKS`
`static final MemoryKey<Boolean>`
`UNIVERSAL_ANGER`

## Method Summary

Modifier and Type
Method
Description
`static @Nullable MemoryKey`
`getByKey(@NotNull NamespacedKey namespacedKey)`
Returns a `MemoryKey` by a `NamespacedKey`.
`@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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.bukkit.Keyed

`key`

## Field Details

### HOME

public static final MemoryKey<Location> HOME

### POTENTIAL_JOB_SITE

public static final MemoryKey<Location> POTENTIAL_JOB_SITE

### JOB_SITE

public static final MemoryKey<Location> JOB_SITE

### MEETING_POINT

public static final MemoryKey<Location> MEETING_POINT

### GOLEM_DETECTED_RECENTLY

public static final MemoryKey<Boolean> GOLEM_DETECTED_RECENTLY

### LAST_SLEPT

public static final MemoryKey<Long> LAST_SLEPT

### LAST_WOKEN

public static final MemoryKey<Long> LAST_WOKEN

### LAST_WORKED_AT_POI

public static final MemoryKey<Long> LAST_WORKED_AT_POI

### UNIVERSAL_ANGER

public static final MemoryKey<Boolean> UNIVERSAL_ANGER

### ANGRY_AT

public static final MemoryKey<UUID> ANGRY_AT

### ADMIRING_ITEM

public static final MemoryKey<Boolean> ADMIRING_ITEM

### ADMIRING_DISABLED

public static final MemoryKey<Boolean> ADMIRING_DISABLED

### HUNTED_RECENTLY

public static final MemoryKey<Boolean> HUNTED_RECENTLY

### PLAY_DEAD_TICKS

public static final MemoryKey<Integer> PLAY_DEAD_TICKS

### TEMPTATION_COOLDOWN_TICKS

public static final MemoryKey<Integer> TEMPTATION_COOLDOWN_TICKS

### IS_TEMPTED

public static final MemoryKey<Boolean> IS_TEMPTED

### LONG_JUMP_COOLING_DOWN

public static final MemoryKey<Integer> LONG_JUMP_COOLING_DOWN

### HAS_HUNTING_COOLDOWN

public static final MemoryKey<Boolean> HAS_HUNTING_COOLDOWN

### RAM_COOLDOWN_TICKS

public static final MemoryKey<Integer> RAM_COOLDOWN_TICKS

### LIKED_PLAYER

public static final MemoryKey<UUID> LIKED_PLAYER

### LIKED_NOTEBLOCK_POSITION

public static final MemoryKey<Location> LIKED_NOTEBLOCK_POSITION

### LIKED_NOTEBLOCK_COOLDOWN_TICKS

public static final MemoryKey<Integer> LIKED_NOTEBLOCK_COOLDOWN_TICKS

### ITEM_PICKUP_COOLDOWN_TICKS

public static final MemoryKey<Integer> ITEM_PICKUP_COOLDOWN_TICKS

## Method Details

### getKey

@NotNull public @NotNull NamespacedKey getKey()
Description copied from interface: `Keyed`
Return the namespaced identifier for this object.

Specified by:
  `getKey` in interface `Keyed`
Returns:
  this object's key

### 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 a `MemoryKey` by a `NamespacedKey`.

Parameters:
  `namespacedKey` - the `NamespacedKey` referencing a `MemoryKey`
Returns:
  the `MemoryKey` or null when no `MemoryKey` is available under that key

### values

@NotNull public static @NotNull Set<MemoryKey> values()
Returns the set of all MemoryKeys.

Returns:
  the memoryKeys