Class PlayerStorage<T>

java.lang.Object
net.dillon.dillonlib.util.PlayerStorage<T>
Type Parameters:
T - the type of data stored for the player's UUID.

public class PlayerStorage<T> extends Object
Stores server-side data for a player's UUID, mainly used for syncing client-options with the server for player preferences.
Since:
1.0
  • Constructor Details

    • PlayerStorage

      public PlayerStorage(T defaultValue)
  • Method Details

    • set

      public void set(UUID playerUuid, T value)
      Sets the value for the player.
    • onSet

      protected void onSet(UUID playerUuid, T value)
      Performs an action when data is set.
    • get

      public T get(UUID playerUuid)
      Returns:
      the value for the player.
    • remove

      public void remove(UUID playerUuid)
      Removes the value for the player.
    • contains

      public boolean contains(UUID playerUuid)
      Returns:
      if the player has this data.