Interface PlayerCacheSaver
- All Known Implementing Classes:
CooldownValidator,UsageLockValidator
public interface PlayerCacheSaver
Optional interface for services with @PlayerCache(saveBeforeRemove = true).
Called before the cache entry is removed on player quit.
- Since:
- 6.2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidsavePlayerData(UUID playerId) Save any pending data for the given player before cache eviction.
-
Method Details
-
savePlayerData
Save any pending data for the given player before cache eviction.Called once per
@PlayerCache(saveBeforeRemove = true)field of the implementing bean. An exception orErrorthrown here is logged as a WARNING by the framework and does not keep the entry: it is removed anyway, and the cleanup of every other field continues (as of 6.3.0, #643; maintainer decision, 2026-10-08). The framework does not retry the save; a module that must not lose the data retries or persists it itself, here.- Parameters:
playerId- the UUID of the player quitting
-