Package com.booksaw.betterTeams.team
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
-
Field Summary
Fields inherited from class com.booksaw.betterTeams.team.SetTeamComponent
set
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(org.bukkit.Location component) Used to check if the component provided is stored within this componentorg.bukkit.Location
fromString
(String str) Used to convert a string into the correct component for this typestatic org.bukkit.Location
getLocation
(String loc) This method is used to convert a string into a location which can be stored for later usestatic String
getString
(org.bukkit.Location loc) This method is used to convert a location into a string which can be stored in a configuration filestatic org.bukkit.Location
normalise
(org.bukkit.Location loc) Normalise the location to the 0,0,0 coords of the current blockvoid
Used to remove a component from this component listtoString
(org.bukkit.Location component) Used to convert a component of the list to a string for savingMethods inherited from class com.booksaw.betterTeams.team.SetTeamComponent
add, clear, get, getClone, getConvertedList, getSectionHeading, isEmpty, load, set, size
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.booksaw.betterTeams.team.TeamComponent
load, save
-
Constructor Details
-
LocationSetComponent
public LocationSetComponent()
-
-
Method Details
-
getLocation
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
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
Description copied from class:SetTeamComponent
Used to convert a string into the correct component for this type- Specified by:
fromString
in classSetTeamComponent<org.bukkit.Location>
- Parameters:
str
- The string to convert- Returns:
- The value to be added to the list
-
toString
Description copied from class:SetTeamComponent
Used to convert a component of the list to a string for saving- Specified by:
toString
in classSetTeamComponent<org.bukkit.Location>
- Parameters:
component
- The component to convert- Returns:
- The converted component
-
remove
Description copied from class:SetTeamComponent
Used to remove a component from this component list- Overrides:
remove
in classSetTeamComponent<org.bukkit.Location>
- Parameters:
team
- The playe's teamcomponent
- 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 classSetTeamComponent<org.bukkit.Location>
- Parameters:
component
- The component to check- Returns:
- If the component is within this component list
-