Interface PlayerInventoryStorage


public interface PlayerInventoryStorage
Persistence backend for player inventories, following the same model as PlayerDataStorage.
Since:
0.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    load(UUID uuid)
    Loads the inventory of a player.
    void
    save(UUID uuid, PlayerInventory inventory)
    Saves the inventory of a player.
  • Method Details

    • load

      PlayerInventory load(UUID uuid) throws IOException
      Loads the inventory of a player.
      Parameters:
      uuid - the player identity
      Returns:
      the saved inventory, or an empty one if the player never had one
      Throws:
      IOException - if the inventory cannot be read
      Since:
      0.1.0
    • save

      void save(UUID uuid, PlayerInventory inventory) throws IOException
      Saves the inventory of a player.
      Parameters:
      uuid - the player identity
      inventory - the inventory to save
      Throws:
      IOException - if the inventory cannot be written
      Since:
      0.1.0