Class LocationSetComponent

java.lang.Object
com.booksaw.betterTeams.team.SetTeamComponent<org.bukkit.Location>
com.booksaw.betterTeams.team.LocationSetComponent
All Implemented Interfaces:
TeamComponent<Set<org.bukkit.Location>>
Direct Known Subclasses:
ChestClaimComponent

public abstract class LocationSetComponent extends SetTeamComponent<org.bukkit.Location>
  • Constructor Details

    • LocationSetComponent

      public LocationSetComponent()
  • Method Details

    • getLocation

      public static org.bukkit.Location getLocation(String loc)
      This method is used to convert a string into a location which can be stored for later use
      Parameters:
      loc - the string to convert into a location
      Returns:
      the location which that string reference
    • getString

      public static String getString(org.bukkit.Location loc)
      This method is used to convert a location into a string which can be stored in a configuration file
      Parameters:
      loc - the location to convert into a string
      Returns:
      the string which references that location
    • normalise

      public static org.bukkit.Location normalise(org.bukkit.Location loc)
      Normalise the location to the 0,0,0 coords of the current block
      Parameters:
      loc - The location to normalise
      Returns:
      The normalised location
    • fromString

      public org.bukkit.Location fromString(String str)
      Description copied from class: SetTeamComponent
      Used to convert a string into the correct component for this type
      Specified by:
      fromString in class SetTeamComponent<org.bukkit.Location>
      Parameters:
      str - The string to convert
      Returns:
      The value to be added to the list
    • toString

      public String toString(org.bukkit.Location component)
      Description copied from class: SetTeamComponent
      Used to convert a component of the list to a string for saving
      Specified by:
      toString in class SetTeamComponent<org.bukkit.Location>
      Parameters:
      component - The component to convert
      Returns:
      The converted component
    • remove

      public void remove(Team team, org.bukkit.Location component)
      Description copied from class: SetTeamComponent
      Used to remove a component from this component list
      Overrides:
      remove in class SetTeamComponent<org.bukkit.Location>
      Parameters:
      team - The playe's team
      component - The component to remove
    • contains

      public boolean contains(org.bukkit.Location component)
      Description copied from class: SetTeamComponent
      Used to check if the component provided is stored within this component
      Overrides:
      contains in class SetTeamComponent<org.bukkit.Location>
      Parameters:
      component - The component to check
      Returns:
      If the component is within this component list