Class TeamStorage

java.lang.Object
com.booksaw.betterTeams.team.storage.team.TeamStorage
Direct Known Subclasses:
SQLTeamStorage, YamlTeamStorage

public abstract class TeamStorage extends Object
Used to manage the storage for a single team. All values in set using set(...) will be automatically saved

NOTE TO SUBCLASSES: Ensure you save any changes if they are not saved automatically

Author:
booksaw
  • Field Details

    • team

      protected final Team team
  • Constructor Details

    • TeamStorage

      protected TeamStorage(Team team)
  • Method Details

    • set

      public void set(StoredTeamValue location, Object value)
      Used to store the given information at the given location
      Parameters:
      location - The location to store the information
      value - The value to store
    • set

      public void set(String location, Object value)
      Used to store the given information at the given location

      If possible use a StoredTeamValue

      This will assume the value type is a string

      Parameters:
      location - The location to store the information
      value - the value to store
    • set

      public void set(String location, TeamStorageType storageType, Object value)
      Used to store the given information at the given location
      Parameters:
      location - The location to store the information
      storageType - The storage type of the information
      value - The value to store
    • setValue

      protected abstract void setValue(String location, TeamStorageType storageType, Object value)
      Used to set a value after checks have been made
      Parameters:
      location - the location to store the value
      storageType - The type of value that is being stored
      value - The value to store
    • getString

      public String getString(StoredTeamValue reference)
    • getString

      public abstract String getString(String reference)
    • getBoolean

      public boolean getBoolean(StoredTeamValue reference)
    • getBoolean

      public abstract boolean getBoolean(String reference)
    • getDouble

      public double getDouble(StoredTeamValue reference)
    • getDouble

      public abstract double getDouble(String reference)
    • getInt

      public int getInt(StoredTeamValue reference)
    • getInt

      public abstract int getInt(String reference)
    • getPlayerList

      public abstract List<TeamPlayer> getPlayerList()
    • setPlayerList

      public abstract void setPlayerList(List<String> players)
    • getAnchoredPlayerList

      public abstract List<UUID> getAnchoredPlayerList()
    • setAnchoredPlayerList

      public abstract void setAnchoredPlayerList(List<String> players)
    • setAnchor

      public abstract void setAnchor(TeamPlayer player, boolean anchor)
    • getBanList

      public abstract List<String> getBanList()
    • setBanList

      public abstract void setBanList(List<String> players)
    • getAllyList

      public abstract List<String> getAllyList()
    • setAllyList

      public abstract void setAllyList(List<String> players)
    • getAllyRequestList

      public abstract List<String> getAllyRequestList()
    • setAllyRequestList

      public abstract void setAllyRequestList(List<String> players)
    • getEchestContents

      public abstract void getEchestContents(org.bukkit.inventory.Inventory inventory)
    • setEchestContents

      public abstract void setEchestContents(org.bukkit.inventory.Inventory inventory)
    • getWarps

      public abstract List<String> getWarps()
    • setWarps

      public abstract void setWarps(List<String> warps)
    • getClaimedChests

      public abstract List<String> getClaimedChests()
    • setClaimedChests

      public abstract void setClaimedChests(List<String> chests)
    • addBan

      public abstract void addBan(UUID component)
    • removeBan

      public abstract void removeBan(UUID component)
    • addAlly

      public abstract void addAlly(UUID ally)
    • removeAlly

      public abstract void removeAlly(UUID ally)
    • addAllyRequest

      public abstract void addAllyRequest(UUID requesting)
    • removeAllyRequest

      public abstract void removeAllyRequest(UUID requesting)
    • addWarp

      public abstract void addWarp(Warp component)
    • removeWarp

      public abstract void removeWarp(Warp component)
    • promotePlayer

      public abstract void promotePlayer(TeamPlayer promotePlayer)
    • demotePlayer

      public abstract void demotePlayer(TeamPlayer demotePlayer)
    • setTitle

      public abstract void setTitle(TeamPlayer player)
    • getRawMeta

      public abstract Map<String,String> getRawMeta()
    • saveMeta

      public abstract void saveMeta(TeamMeta meta)