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
    void
    load(UUID uuid, PlayerInventory inventory)
    Loads the inventory of a player into the one the server hands over.
    void
    save(UUID uuid, PlayerInventory inventory)
    Saves the inventory of a player.
  • Method Details

    • load

      void load(UUID uuid, PlayerInventory inventory) throws IOException
      Loads the inventory of a player into the one the server hands over.
      Parameters:
      uuid - the player identity
      inventory - an empty inventory to fill with the saved one, left empty 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