Contents
Class MemoriesPlugin
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.builtin.adventure.memories.MemoriesPlugin
- All Implemented Interfaces:
CommandOwner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe legacy path to the memories JSON file, relative to the universe directory.static final StringThe universe resource id for the recorded memories.Fields inherited from class PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic MemoriesPluginget()intgetMemoriesLevel(GameplayConfig gameplayConfig) Computes the current Memories level for a given config.booleanhasRecordedMemory(Memory memory) voidbooleanrecordPlayerMemories(PlayerMemories playerMemories) <T extends Memory>
voidregisterMemoryProvider(MemoryProvider<T> memoryProvider) intsetRecordedMemoriesCount(int count) Sets the number of recorded memories to a specific count for testing purposes.Methods inherited from class JavaPlugin
getClassLoader, getFile, getTypeMethods inherited from class PluginBase
getAssetRegistry, getBasePermission, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad
-
Field Details
-
MEMORIES_JSON_PATH
The legacy path to the memories JSON file, relative to the universe directory. Migrated into the universe resources directory on setup.- See Also:
-
RECORDED_MEMORIES_ID
The universe resource id for the recorded memories.- See Also:
-
-
Constructor Details
-
MemoriesPlugin
-
-
Method Details
-
get
-
getConfig
-
getPlayerMemoriesComponentType
-
registerMemoryProvider
-
getAllMemories
-
getMemoriesLevel
Computes the current Memories level for a given config.- Parameters:
gameplayConfig- The gameplay config to get the Memories level for.- Returns:
- The level of Memories - it starts from 1.
-
hasRecordedMemory
-
recordPlayerMemories
-
getRecordedMemories
-
clearRecordedMemories
public void clearRecordedMemories() -
recordAllMemories
public void recordAllMemories() -
setRecordedMemoriesCount
public int setRecordedMemoriesCount(int count) Sets the number of recorded memories to a specific count for testing purposes. This will clear existing recorded memories and add the specified number of memories from all available memories.- Parameters:
count- The number of memories to record. If count exceeds available memories, all memories will be recorded.- Returns:
- The actual number of memories recorded.
-