Klasse StashStore
java.lang.Object
de.delinkedde.mobarenareborn.player.StashStore
Persists
PlayerStash snapshots to disk while their owner is inside an arena.
A stash is written when the player joins an arena and deleted as soon as it is restored
through any normal path (leave, elimination cleanup, round end, quit). If the server crashes
mid-round, the stash therefore survives in stashes.yml; on the player's next join the
pending snapshot is applied so they get their real inventory, hearts and location back instead of
keeping the arena kit.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidDeletes a player's persisted stash after a successful restore.boolean@Nullable PlayerStashLoads a player's persisted stash.voidsave(@NotNull UUID uuid, @NotNull PlayerStash stash) Persists a stash for a player.
-
Konstruktordetails
-
StashStore
- Parameter:
plugin- the owning plugin, used for the data folder and logging
-
-
Methodendetails
-
save
Persists a stash for a player.- Parameter:
uuid- the player's unique idstash- the stash to persist
-
has
- Parameter:
uuid- the player's unique id- Gibt zurück:
- whether a persisted stash exists for the player
-
load
Loads a player's persisted stash.- Parameter:
uuid- the player's unique id- Gibt zurück:
- the stash, or
nullif none is stored or it cannot be read
-
delete
Deletes a player's persisted stash after a successful restore.- Parameter:
uuid- the player's unique id
-