Class Jail
java.lang.Object
com.palmergames.bukkit.towny.object.Loadable
com.palmergames.bukkit.towny.object.jail.Jail
- All Implemented Interfaces:
Savable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddJailCell(Position position) voidaddJailCell(org.bukkit.Location location) booleanexists()intList<org.bukkit.Location> getName()getObjectDataMap(SerializationContext context) getTown()getUUID()booleanhasCells()booleanhasJailCell(int index) booleanbooleanhasName()booleanvoidvoidvoidremoveJailCell(org.bukkit.Location loc) voidsave()Schedules the object to be saved to the database.voidsetJailCells(List<org.bukkit.Location> jailCells) voidvoidsetTownBlock(TownBlock townBlock) voidMethods inherited from class Loadable
getOrDefault, getOrDefault, getOrDefault, getOrDefault, getOrDefault, getSplitter, getTownBlockForSaving, hasData, parseLocationForSaving, parseNationFromDB, parseNationsFromDB, parseResidentsFromDB, parseSpawnLocationFromDB, parseTownBlockFromDB, parseTownFromDB, parseTownsFromDB, serializeMetadata, toList, toUUIDArray, toUUIDList
-
Constructor Details
-
Jail
-
Jail
-
-
Method Details
-
getUUID
-
setUUID
-
getTown
-
setTown
-
getTownBlock
-
setTownBlock
-
getJailCellLocations
-
getJailCellPositions
-
getJailCellCount
public int getJailCellCount() -
setJailCells
-
addJailCell
public void addJailCell(org.bukkit.Location location) -
addJailCell
-
removeJailCell
public void removeJailCell(org.bukkit.Location loc) -
removeJailCell
-
removeAllCells
public void removeAllCells() -
hasJailCell
-
hasJailCell
public boolean hasJailCell(int index) -
getWildName
-
save
-
getObjectDataMap
@Internal public Map<String,Object> getObjectDataMap(SerializationContext context) throws ObjectSaveException - Specified by:
getObjectDataMapin interfaceSavable- Parameters:
context- SerializationContext with information.- Returns:
- a Map which stores keys and values, meant to be written to a database.
- Throws:
ObjectSaveException- when something cannot be saved.
-
load
-
exists
@Internal public boolean exists() -
hasCells
public boolean hasCells() -
hasName
public boolean hasName() -
getName
-