Class TownyWorld
java.lang.Object
com.palmergames.bukkit.towny.object.TownyObject
com.palmergames.bukkit.towny.object.TownyWorld
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBedExplosionAtBlock(org.bukkit.Location location, org.bukkit.Material material) voidaddMetaData(@NotNull CustomDataField<?> md) Add a specific metadata to this TownyObject.voidvoidaddTridentStrike(UUID uuid) booleanbooleanexists()An internal method used to determine if an object exists in the TownyUniverse's maps.@Nullable org.bukkit.MaterialgetBedExplosionMaterial(org.bukkit.Location location) Gets the exploded bed material.@Nullable org.bukkit.World@Nullable TownBlockGet the town block that belongs to the closest town with a nation from the specified coord.getClosestTownWithNationFromCoord(Coord key, Town nearestTown) Returns the closest town with a nation from a given coord (key).intgetMinDistanceFromOtherPlotsOwnedByTown(Coord key, Town town) Returns the distance to the closest townblock from the given coord, for the give town.intChecks the distance from the closest homeblock.intgetMinDistanceFromOtherTownsHomeBlocks(Coord key, Town homeTown) Checks the distance from a another town's homeblock, or the distance to another Town if homeTown is null.intChecks the distance from the closest town block.intgetMinDistanceFromOtherTownsPlots(Coord key, Town homeTown) Checks the distance from a another town's plots.Collection<org.bukkit.Material> Collection<org.bukkit.Material> Collection<org.bukkit.Material> Collection<org.bukkit.Material> Collection<org.bukkit.Material> longCollection<org.bukkit.entity.EntityType> Collection<org.bukkit.Material> getTownBlock(int x, int z) getTownBlock(Coord coord) getTownBlocks(Town town) getTowns()getTreeString(int depth) Collection<org.bukkit.entity.EntityType> Collection<org.bukkit.Material> booleangetUUID()Collection<org.bukkit.Material> booleanhasBedExplosionAtBlock(org.bukkit.Location location) Does this world have an exploded bet at the location?inthashCode()booleanbooleanbooleanhasTownBlock(Coord key) booleanhasTowns()booleanhasTridentStrike(UUID uuid) booleanbooleanbooleanbooleanbooleanbooleanbooleanisExpl()booleanisExplodedBlockAllowedToRevert(org.bukkit.Material mat) booleanisFire()booleanbooleanbooleanbooleanbooleanbooleanisMaterialNotAllowedToBeOverwrittenByWildRevert(org.bukkit.Material mat) booleanisPlotManagementDeleteIds(org.bukkit.Material material) booleanisPlotManagementIgnoreIds(org.bukkit.Material mat) booleanisPlotManagementMayorDelete(org.bukkit.Material material) booleanisPlotManagementWildRevertWhitelistedBlock(org.bukkit.Material mat) booleanisProtectingExplosionBlock(org.bukkit.Material material) booleanisProtectingExplosionEntity(org.bukkit.entity.Entity entity) booleanisPVP()booleanisRevertOnUnclaimWhitelistMaterial(org.bukkit.Material mat) booleanisUnclaimedBlockAllowedToRevert(org.bukkit.Material mat) booleanisUnclaimedZoneIgnoreMaterial(org.bukkit.Material mat) booleanbooleanbooleanbooleanbooleanbooleanbooleanvoidremoveBedExplosionAtBlock(org.bukkit.Location location) voidremoveMetaData(@NotNull CustomDataField<?> md) Remove a specific metadata from the TownyObject.voidremoveTown(Town town) voidremoveTridentStrike(UUID uuid) voidsave()Schedules the object to be saved to the database.voidsetClaimable(boolean isClaimable) voidsetDeletingEntitiesOnUnclaim(boolean using) voidsetDisableCreatureTrample(boolean isDisableCreatureTrample) voidsetEndermanProtect(boolean setEnder) voidsetExpl(boolean isExpl) voidsetFire(boolean isFire) voidsetForceExpl(boolean isExpl) voidsetForceFire(boolean isFire) voidsetForcePVP(boolean isPVP) voidsetForceTownMobs(boolean setMobs) voidsetFriendlyFire(boolean parseBoolean) voidsetPlotManagementDeleteIds(List<String> plotManagementDeleteIds) voidsetPlotManagementIgnoreIds(List<String> plotManagementIgnoreIds) voidsetPlotManagementMayorDelete(List<String> plotManagementMayorDelete) voidvoidsetPlotManagementWildRevertDelay(long plotManagementWildRevertDelay) voidsetPlotManagementWildRevertEntities(List<String> entities) voidvoidsetPVP(boolean isPVP) voidsetRevertOnUnclaimWhitelistMaterials(List<String> revertOnUnclaimWhitelistMaterials) voidsetUnclaimDeleteEntityTypes(List<String> entityTypes) voidsetUnclaimedZoneBuild(Boolean unclaimedZoneBuild) voidsetUnclaimedZoneDestroy(Boolean unclaimedZoneDestroy) voidsetUnclaimedZoneIgnore(List<String> unclaimedZoneIgnoreIds) voidsetUnclaimedZoneItemUse(Boolean unclaimedZoneItemUse) voidsetUnclaimedZoneName(String unclaimedZoneName) voidsetUnclaimedZoneSwitch(Boolean unclaimedZoneSwitch) voidvoidsetUsingPlotManagementDelete(boolean using) voidsetUsingPlotManagementMayorDelete(boolean using) voidsetUsingPlotManagementRevert(boolean using) voidsetUsingPlotManagementWildBlockRevert(boolean isUsingPlotManagementWildBlockRevert) voidsetUsingPlotManagementWildEntityRevert(boolean isUsingPlotManagementWildEntityRevert) voidsetUsingTowny(boolean isUsingTowny) voidvoidsetWarAllowed(boolean isWarAllowed) voidsetWildernessMobs(boolean hasMonsters) voidvoidsetWorldMobs(boolean hasMobs) Methods inherited from class com.palmergames.bukkit.towny.object.TownyObject
addMetaData, getMetadata, getMetadata, getMetadata, getName, getTreeDepth, hasMeta, hasMeta, hasMeta, removeMetaData, removeMetaData, removeMetaData, setName, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.palmergames.bukkit.towny.object.Nameable
getFormattedName
-
Field Details
-
bedMap
-
tridentStrikeList
-
-
Constructor Details
-
TownyWorld
-
TownyWorld
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
getUUID
-
setUUID
-
getBukkitWorld
@Nullable public @Nullable org.bukkit.World getBukkitWorld() -
getTowns
-
hasTowns
public boolean hasTowns() -
hasTown
-
hasTown
-
addTown
-
getTownBlock
- Throws:
NotRegisteredException
-
hasTownBlock
-
getTownBlock
- Throws:
NotRegisteredException
-
getTownBlocks
-
getTownBlocks
-
removeTown
- Throws:
NotRegisteredException
-
getTreeString
- Overrides:
getTreeStringin classTownyObject
-
setWarAllowed
public void setWarAllowed(boolean isWarAllowed) -
isWarAllowed
public boolean isWarAllowed() -
setPVP
public void setPVP(boolean isPVP) -
isPVP
public boolean isPVP() -
setForcePVP
public void setForcePVP(boolean isPVP) -
isForcePVP
public boolean isForcePVP() -
setExpl
public void setExpl(boolean isExpl) -
isExpl
public boolean isExpl() -
setForceExpl
public void setForceExpl(boolean isExpl) -
isForceExpl
public boolean isForceExpl() -
setFire
public void setFire(boolean isFire) -
isFire
public boolean isFire() -
setForceFire
public void setForceFire(boolean isFire) -
isForceFire
public boolean isForceFire() -
setDisableCreatureTrample
public void setDisableCreatureTrample(boolean isDisableCreatureTrample) -
isDisableCreatureTrample
public boolean isDisableCreatureTrample() -
setWorldMobs
public void setWorldMobs(boolean hasMobs) -
hasWorldMobs
public boolean hasWorldMobs() -
setWildernessMobs
public void setWildernessMobs(boolean hasMonsters) -
hasWildernessMobs
public boolean hasWildernessMobs() -
setForceTownMobs
public void setForceTownMobs(boolean setMobs) -
isForceTownMobs
public boolean isForceTownMobs() -
setEndermanProtect
public void setEndermanProtect(boolean setEnder) -
isEndermanProtect
public boolean isEndermanProtect() -
setClaimable
public void setClaimable(boolean isClaimable) -
isClaimable
public boolean isClaimable() -
setUsingDefault
public void setUsingDefault() -
setUsingPlotManagementDelete
public void setUsingPlotManagementDelete(boolean using) -
isUsingPlotManagementDelete
public boolean isUsingPlotManagementDelete() -
setDeletingEntitiesOnUnclaim
public void setDeletingEntitiesOnUnclaim(boolean using) -
isDeletingEntitiesOnUnclaim
public boolean isDeletingEntitiesOnUnclaim() -
getUnclaimDeleteEntityTypes
-
setUnclaimDeleteEntityTypes
-
setUsingPlotManagementMayorDelete
public void setUsingPlotManagementMayorDelete(boolean using) -
isUsingPlotManagementMayorDelete
public boolean isUsingPlotManagementMayorDelete() -
setUsingPlotManagementRevert
public void setUsingPlotManagementRevert(boolean using) -
isUsingPlotManagementRevert
public boolean isUsingPlotManagementRevert() -
getPlotManagementDeleteIds
-
isPlotManagementDeleteIds
public boolean isPlotManagementDeleteIds(org.bukkit.Material material) -
setPlotManagementDeleteIds
-
getPlotManagementMayorDelete
-
isPlotManagementMayorDelete
public boolean isPlotManagementMayorDelete(org.bukkit.Material material) -
setPlotManagementMayorDelete
-
isUnclaimedBlockAllowedToRevert
public boolean isUnclaimedBlockAllowedToRevert(org.bukkit.Material mat) -
getPlotManagementIgnoreIds
-
isPlotManagementIgnoreIds
public boolean isPlotManagementIgnoreIds(org.bukkit.Material mat) -
setPlotManagementIgnoreIds
-
getRevertOnUnclaimWhitelistMaterials
-
setRevertOnUnclaimWhitelistMaterials
-
isRevertOnUnclaimWhitelistMaterial
public boolean isRevertOnUnclaimWhitelistMaterial(org.bukkit.Material mat) -
isUsingPlotManagementWildEntityRevert
public boolean isUsingPlotManagementWildEntityRevert()- Returns:
- the isUsingPlotManagementWildEntityRevert
-
isUsingPlotManagementWildBlockRevert
public boolean isUsingPlotManagementWildBlockRevert()- Returns:
- the isUsingPlotManagementWildBlockRevert
-
setUsingPlotManagementWildEntityRevert
public void setUsingPlotManagementWildEntityRevert(boolean isUsingPlotManagementWildEntityRevert) - Parameters:
isUsingPlotManagementWildEntityRevert- the isUsingPlotManagementWildRevert to set
-
setUsingPlotManagementWildBlockRevert
public void setUsingPlotManagementWildBlockRevert(boolean isUsingPlotManagementWildBlockRevert) - Parameters:
isUsingPlotManagementWildBlockRevert- the isUsingPlotManagementWildBlockRevert to set
-
getPlotManagementWildRevertDelay
public long getPlotManagementWildRevertDelay()- Returns:
- the plotManagementWildRevertDelay
-
setPlotManagementWildRevertDelay
public void setPlotManagementWildRevertDelay(long plotManagementWildRevertDelay) - Parameters:
plotManagementWildRevertDelay- the plotManagementWildRevertDelay to set
-
setPlotManagementWildRevertEntities
-
getPlotManagementWildRevertEntities
-
isProtectingExplosionEntity
public boolean isProtectingExplosionEntity(org.bukkit.entity.Entity entity) -
setPlotManagementWildRevertBlockWhitelist
-
getPlotManagementWildRevertBlockWhitelist
-
isPlotManagementWildRevertWhitelistedBlock
public boolean isPlotManagementWildRevertWhitelistedBlock(org.bukkit.Material mat) -
isExplodedBlockAllowedToRevert
public boolean isExplodedBlockAllowedToRevert(org.bukkit.Material mat) -
setWildRevertMaterialsToNotOverwrite
-
getWildRevertMaterialsToNotOverwrite
-
isMaterialNotAllowedToBeOverwrittenByWildRevert
public boolean isMaterialNotAllowedToBeOverwrittenByWildRevert(org.bukkit.Material mat) -
setPlotManagementWildRevertMaterials
-
getPlotManagementWildRevertBlocks
-
isProtectingExplosionBlock
public boolean isProtectingExplosionBlock(org.bukkit.Material material) -
setUnclaimedZoneIgnore
-
getUnclaimedZoneIgnoreMaterials
-
isUnclaimedZoneIgnoreMaterial
public boolean isUnclaimedZoneIgnoreMaterial(org.bukkit.Material mat) -
getUnclaimedZonePerm
-
getUnclaimedZoneBuild
-
setUnclaimedZoneBuild
-
getUnclaimedZoneDestroy
-
setUnclaimedZoneDestroy
-
getUnclaimedZoneSwitch
-
setUnclaimedZoneSwitch
-
getUnclaimedZoneName
-
getFormattedUnclaimedZoneName
-
setUnclaimedZoneName
-
setUsingTowny
public void setUsingTowny(boolean isUsingTowny) -
isUsingTowny
public boolean isUsingTowny() -
setUnclaimedZoneItemUse
-
getUnclaimedZoneItemUse
-
getMinDistanceFromOtherTownsHomeBlocks
Checks the distance from the closest homeblock.- Parameters:
key- - Coord to check from.- Returns:
- the distance to nearest towns homeblock.
-
getMinDistanceFromOtherTownsHomeBlocks
Checks the distance from a another town's homeblock, or the distance to another Town if homeTown is null.- Parameters:
key- Coord to check from.homeTown- The town belonging to a player, so that the town's own homeblock is not returned, or null if this should apply to any townblock, and not just homeblocks.- Returns:
- the closest distance to another towns homeblock.
-
getMinDistanceFromOtherTownsPlots
Checks the distance from the closest town block.- Parameters:
key- - Coord to check from.- Returns:
- the distance to nearest town's townblock.
-
getMinDistanceFromOtherTownsPlots
Checks the distance from a another town's plots.- Parameters:
key- - Coord to check from.homeTown- Players town- Returns:
- the closest distance to another towns nearest plot.
-
getMinDistanceFromOtherPlotsOwnedByTown
Returns the distance to the closest townblock from the given coord, for the give town.- Parameters:
key- Coord to be tested from.town- Town to have their townblocks measured.- Returns:
- the closest distance to the towns townblock.
-
getClosestTownWithNationFromCoord
Returns the closest town with a nation from a given coord (key).- Parameters:
key- - Coord.nearestTown- - Closest town to given coord.- Returns:
- the nearest town belonging to a nation.
-
getClosestTownblockWithNationFromCoord
Get the town block that belongs to the closest town with a nation from the specified coord.- Parameters:
key- - Coordinate to compare distance to- Returns:
- The nearest townblock that belongs to a town or null if there are no towns in the world.
-
addMetaData
Description copied from class:TownyObjectAdd a specific metadata to this TownyObject. Overrides existing metadata of the same key. Most implementations will save the object after this method is called.- Overrides:
addMetaDatain classTownyObject- Parameters:
md- CustomDataField to add.
-
removeMetaData
Description copied from class:TownyObjectRemove a specific metadata from the TownyObject. The metadata does not need to be the same instance of the one added, but must have the same key. Most implementations will save the TownyObject after removing the metadata.- Overrides:
removeMetaDatain classTownyObject- Parameters:
md- CustomDataField to remove.
-
hasBedExplosionAtBlock
@Internal public boolean hasBedExplosionAtBlock(org.bukkit.Location location) Does this world have an exploded bet at the location?- Parameters:
location- Location to test.- Returns:
- true when the bed map contains the location.
-
getBedExplosionMaterial
@Nullable @Internal public @Nullable org.bukkit.Material getBedExplosionMaterial(org.bukkit.Location location) Gets the exploded bed material.- Parameters:
location- Location to get the material.- Returns:
- material of the bed or null if the bedMap doesn't contain the location.
-
addBedExplosionAtBlock
@Internal public void addBedExplosionAtBlock(org.bukkit.Location location, org.bukkit.Material material) -
removeBedExplosionAtBlock
@Internal public void removeBedExplosionAtBlock(org.bukkit.Location location) -
hasTridentStrike
-
addTridentStrike
-
removeTridentStrike
-
setFriendlyFire
public void setFriendlyFire(boolean parseBoolean) -
isFriendlyFireEnabled
public boolean isFriendlyFireEnabled() -
save
public void save()Description copied from interface:SavableSchedules the object to be saved to the database. -
exists
@Internal public boolean exists()Description copied from class:TownyObjectAn internal method used to determine if an object exists in the TownyUniverse's maps.- Specified by:
existsin classTownyObject- Returns:
- true if this TownyObject exists.
-