Annotation Interface PlayerCache
Marks a Map<UUID, ?> field for automatic cleanup when a player quits.
When a player disconnects, the framework automatically calls remove(uuid) on all annotated maps across all registered service beans.
标记一个 Map<UUID, ?> 字段,当玩家退出时自动清理。
- Since:
- 6.2.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanIf true, the framework will call the bean'ssavePlayerData(UUID)method (if it implementsPlayerCacheSaver) before removing the entry.
-
Element Details
-
saveBeforeRemove
boolean saveBeforeRemoveIf true, the framework will call the bean'ssavePlayerData(UUID)method (if it implementsPlayerCacheSaver) before removing the entry.- Returns:
- whether to save before removing
- Default:
false
-