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 TypeMethodDescriptionbooleancontains(org.bukkit.Location component) Used to check if the component provided is stored within this componentorg.bukkit.LocationfromString(String str) Used to convert a string into the correct component for this typestatic org.bukkit.LocationgetLocation(String loc) This method is used to convert a string into a location which can be stored for later usestatic StringgetString(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.Locationnormalise(org.bukkit.Location loc) Normalise the location to the 0,0,0 coords of the current blockvoidUsed 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, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:SetTeamComponentUsed to convert a string into the correct component for this type- Specified by:
fromStringin classSetTeamComponent<org.bukkit.Location>- Parameters:
str- The string to convert- Returns:
- The value to be added to the list
-
toString
Description copied from class:SetTeamComponentUsed to convert a component of the list to a string for saving- Specified by:
toStringin classSetTeamComponent<org.bukkit.Location>- Parameters:
component- The component to convert- Returns:
- The converted component
-
remove
Description copied from class:SetTeamComponentUsed to remove a component from this component list- Overrides:
removein 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:SetTeamComponentUsed to check if the component provided is stored within this component- Overrides:
containsin classSetTeamComponent<org.bukkit.Location>- Parameters:
component- The component to check- Returns:
- If the component is within this component list
-