Class TownyWorld
java.lang.Object
com.palmergames.bukkit.towny.object.TownyObject
com.palmergames.bukkit.towny.object.TownyWorld
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBedExplosionAtBlock
(org.bukkit.Location location, org.bukkit.Material material) void
addMetaData
(@NotNull CustomDataField<?> md) Add a specific metadata to this TownyObject.void
void
addTridentStrike
(UUID uuid) boolean
boolean
exists()
An internal method used to determine if an object exists in the TownyUniverse's maps.@Nullable org.bukkit.Material
getBedExplosionMaterial
(org.bukkit.Location location) Gets the exploded bed material.@Nullable org.bukkit.World
@Nullable TownBlock
Get 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).int
getMinDistanceFromOtherPlotsOwnedByTown
(Coord key, Town town) Returns the distance to the closest townblock from the given coord, for the give town.int
Checks the distance from the closest homeblock.int
getMinDistanceFromOtherTownsHomeBlocks
(Coord key, Town homeTown) Checks the distance from a another town's homeblock, or the distance to another Town if homeTown is null.int
Checks the distance from the closest town block.int
getMinDistanceFromOtherTownsPlots
(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> long
Collection
<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> boolean
getUUID()
Collection
<org.bukkit.Material> boolean
hasBedExplosionAtBlock
(org.bukkit.Location location) Does this world have an exploded bet at the location?int
hashCode()
boolean
boolean
boolean
hasTownBlock
(Coord key) boolean
hasTowns()
boolean
hasTridentStrike
(UUID uuid) boolean
boolean
boolean
boolean
boolean
boolean
boolean
isExpl()
boolean
isExplodedBlockAllowedToRevert
(org.bukkit.Material mat) boolean
isFire()
boolean
boolean
boolean
boolean
boolean
boolean
isMaterialNotAllowedToBeOverwrittenByWildRevert
(org.bukkit.Material mat) boolean
isPlotManagementDeleteIds
(org.bukkit.Material material) boolean
isPlotManagementIgnoreIds
(org.bukkit.Material mat) boolean
isPlotManagementMayorDelete
(org.bukkit.Material material) boolean
isPlotManagementWildRevertWhitelistedBlock
(org.bukkit.Material mat) boolean
isProtectingExplosionBlock
(org.bukkit.Material material) boolean
isProtectingExplosionEntity
(org.bukkit.entity.Entity entity) boolean
isPVP()
boolean
isRevertOnUnclaimWhitelistMaterial
(org.bukkit.Material mat) boolean
isUnclaimedBlockAllowedToRevert
(org.bukkit.Material mat) boolean
isUnclaimedZoneIgnoreMaterial
(org.bukkit.Material mat) boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
removeBedExplosionAtBlock
(org.bukkit.Location location) void
removeMetaData
(@NotNull CustomDataField<?> md) Remove a specific metadata from the TownyObject.void
removeTown
(Town town) void
removeTridentStrike
(UUID uuid) void
save()
Schedules the object to be saved to the database.void
setClaimable
(boolean isClaimable) void
setDeletingEntitiesOnUnclaim
(boolean using) void
setDisableCreatureTrample
(boolean isDisableCreatureTrample) void
setEndermanProtect
(boolean setEnder) void
setExpl
(boolean isExpl) void
setFire
(boolean isFire) void
setForceExpl
(boolean isExpl) void
setForceFire
(boolean isFire) void
setForcePVP
(boolean isPVP) void
setForceTownMobs
(boolean setMobs) void
setFriendlyFire
(boolean parseBoolean) void
setPlotManagementDeleteIds
(List<String> plotManagementDeleteIds) void
setPlotManagementIgnoreIds
(List<String> plotManagementIgnoreIds) void
setPlotManagementMayorDelete
(List<String> plotManagementMayorDelete) void
void
setPlotManagementWildRevertDelay
(long plotManagementWildRevertDelay) void
setPlotManagementWildRevertEntities
(List<String> entities) void
void
setPVP
(boolean isPVP) void
setRevertOnUnclaimWhitelistMaterials
(List<String> revertOnUnclaimWhitelistMaterials) void
setUnclaimDeleteEntityTypes
(List<String> entityTypes) void
setUnclaimedZoneBuild
(Boolean unclaimedZoneBuild) void
setUnclaimedZoneDestroy
(Boolean unclaimedZoneDestroy) void
setUnclaimedZoneIgnore
(List<String> unclaimedZoneIgnoreIds) void
setUnclaimedZoneItemUse
(Boolean unclaimedZoneItemUse) void
setUnclaimedZoneName
(String unclaimedZoneName) void
setUnclaimedZoneSwitch
(Boolean unclaimedZoneSwitch) void
void
setUsingPlotManagementDelete
(boolean using) void
setUsingPlotManagementMayorDelete
(boolean using) void
setUsingPlotManagementRevert
(boolean using) void
setUsingPlotManagementWildBlockRevert
(boolean isUsingPlotManagementWildBlockRevert) void
setUsingPlotManagementWildEntityRevert
(boolean isUsingPlotManagementWildEntityRevert) void
setUsingTowny
(boolean isUsingTowny) void
void
setWarAllowed
(boolean isWarAllowed) void
setWildernessMobs
(boolean hasMonsters) void
void
setWorldMobs
(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, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
getTreeString
in 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:TownyObject
Add 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:
addMetaData
in classTownyObject
- Parameters:
md
- CustomDataField to add.
-
removeMetaData
Description copied from class:TownyObject
Remove 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:
removeMetaData
in 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:Savable
Schedules the object to be saved to the database. -
exists
@Internal public boolean exists()Description copied from class:TownyObject
An internal method used to determine if an object exists in the TownyUniverse's maps.- Specified by:
exists
in classTownyObject
- Returns:
- true if this TownyObject exists.
-