Uses of Class
com.palmergames.bukkit.towny.object.Town
Package
Description
-
Uses of Town in com.palmergames.bukkit.towny
Modifier and TypeMethodDescription@Nullable Town
TownyAPI.getResidentTownOrNull
(Resident resident) Gets the resident's town if they have one.@Nullable Town
TownyAPI.getTown
(@NotNull org.bukkit.entity.Player player) @Nullable Town
Gets the town from the given name.@Nullable Town
Gets the town from the given UUID.@Nullable Town
TownyAPI.getTown
(org.bukkit.Location location) Get theTown
at a specificLocation
.@Nullable Town
@Nullable Town
@Nullable Town
TownyAPI.getTownOrNull
(TownBlock townBlock) Modifier and TypeMethodDescriptionTownyAPI.getTowns()
Get a List of all the Towns.Gets a List of Towns using an array of names.Gets a List of Towns using a List of UUIDs@Unmodifiable Collection<Town>
TownyUniverse.getTowns()
TownyAPI.getTownsWithoutNation()
Get a List of all the Towns that aren't a part of a Nation.Modifier and TypeMethodDescriptionstatic String
TownySettings.getCapitalPostfix
(Town town) static String
TownySettings.getCapitalPrefix
(Town town) static int
TownySettings.getMaxBonusBlocks
(Town town) static int
TownySettings.getMaxBonusBlocks
(Town town, int residents) static int
TownySettings.getMaxOutposts
(Town town) static int
TownySettings.getMaxOutposts
(Town town, int residents) static int
TownySettings.getMaxOutposts
(Town town, int residentsAmount, int townsAmount) static int
TownySettings.getMaxPurchasedBlocks
(Town town) static int
TownySettings.getMaxPurchasedBlocks
(Town town, int residents) static int
TownySettings.getMaxResidentsForTown
(Town town) static int
TownySettings.getMaxTownBlocks
(Town town) static int
TownySettings.getMaxTownBlocks
(Town town, int residents) static int
TownySettings.getNationBonusBlocks
(Town town) List<org.bukkit.entity.Player>
TownyAPI.getOnlinePlayersInTown
(Town town) Gets all onlinePlayer
s for a specificTown
.TownyFormatter.getRanksForTown
(Town town, Translator translator) Returns a Chat Formatted List of all town residents who hold a rank.static StatusScreen
Gets the status screen of a Town.static double
TownySettings.getTownBankCap
(Town town) static TownySettings.TownLevel
TownySettings.getTownLevel
(Town town) static TownySettings.TownLevel
TownySettings.getTownLevel
(Town town, int residents) Deprecated.static int
TownySettings.getTownLevelFromGivenInt
(int threshold, Town town) Get the town level for a given population size.static TownySettings.TownLevel
TownySettings.getTownLevelWithModifier
(int modifier, Town town) @Nullable Nation
TownyAPI.getTownNationOrNull
(Town town) Gets the town's nation if they have one.static double
TownySettings.getTownNeutralityCost
(Town town) static double
TownySettings.getTownPenaltyUpkeepCost
(Town town) static String
TownySettings.getTownPostfix
(Town town) static String
TownySettings.getTownPrefix
(Town town) TownyFormatter.getTownSubtitle
(Town town, TownyWorld world, Translator translator) Returns the 2nd line of the Town StatusScreen.static double
TownySettings.getTownUpkeepCost
(Town town) static boolean
TownySettings.isSellingBonusBlocks
(Town town) void
TownyUniverse.registerTown
(@NotNull Town town) Used to register a town into the TownyUniverse internal maps.void
TownyUniverse.registerTownUUID
(@NotNull Town town) static void
TownyMessaging.sendJailList
(org.bukkit.command.CommandSender sender, Town town, int page, int total) static void
TownyMessaging.sendOutpostList
(org.bukkit.entity.Player player, Town town, int page, int total) static void
TownyMessaging.sendPlotGroupList
(org.bukkit.command.CommandSender sender, Town town, int page, int total) static void
TownyMessaging.sendPrefixedTownMessage
(Town town, Translatable message) Send a message to All online residents of a town and log preceded by the [Townname], translated for the end-user.static void
TownyMessaging.sendPrefixedTownMessage
(Town town, String line) Send a message to All online residents of a town and log preceded by the [Townname]static void
TownyMessaging.sendTitleMessageToTown
(Town town, String title, String subtitle) Send a Title and Subtitle to a town with default duration (70 ticks.)static void
TownyMessaging.sendTitleMessageToTown
(Town town, String title, String subtitle, int duration) Send a Title and Subtitle to a town for a specified number of ticks.static void
TownyMessaging.sendTownBoard
(org.bukkit.command.CommandSender sender, Town town) Send the town board to a player (in yellow)static void
TownyMessaging.sendTownMessagePrefixed
(Town town, Translatable message) Send a message to All online residents of a town and log, preceded by the default_towny_prefixvoid
TownyAPI.testTownClaimOrThrow
(Town town, WorldCoord coordToClaim, boolean outpost, boolean newTown) Test a WorldCoord to see if Towny would allow the area to be claimed by the given town.void
TownyAPI.testTownUnclaimOrThrow
(Town town, WorldCoord coordToUnclaim) Test a WorldCoord to see if Towny would allow the area to be unclaimed by the given town.void
TownyUniverse.unregisterTown
(@NotNull Town town) Used to unregister a town from the TownyUniverse internal maps. -
Uses of Town in com.palmergames.bukkit.towny.command
Modifier and TypeMethodDescriptionprotected static @NotNull Town
BaseCommand.getTownFromPlayerOrThrow
(org.bukkit.entity.Player player) protected static @NotNull Town
BaseCommand.getTownFromResidentOrThrow
(@NotNull Resident resident) protected static @NotNull Town
BaseCommand.getTownOrThrow
(String townName) static Town
TownCommand.newTown
(TownyWorld world, String name, Resident resident, Coord key, org.bukkit.Location spawn, org.bukkit.entity.Player player) static Town
TownCommand.newTown
(TownyWorld world, String name, Resident resident, Coord key, org.bukkit.Location spawn, org.bukkit.entity.Player player, double cost) Modifier and TypeMethodDescriptionprotected static @NotNull Nation
BaseCommand.getNationFromTownOrThrow
(Town town) TownyCommand.getTownyPrices
(Town town, Translator translator) Returns prices for town's taxes/upkeep.static void
TownyAdminCommand.handleTownMetaCommand
(org.bukkit.command.CommandSender sender, Town town, String[] split) static void
Final stage of adding a town to a nation, via joining or via accepting an invite.static Nation
static void
NationCommand.newNation
(org.bukkit.command.CommandSender sender, String name, Town capitalTown, boolean noCharge) Ties together the player-run /new nation and the admin-run /ta nation new NAME CAPITAL code.void
PlotCommand.parsePlotGroupAdd
(String[] split, TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parsePlotGroupDelete
(TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parsePlotGroupForSale
(String[] split, Resident resident, TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parsePlotGroupNotForSale
(Resident resident, TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parsePlotGroupRemove
(TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parsePlotGroupSet
(String[] split, Resident resident, TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parsePlotGroupSetPerm
(String[] args, TownBlock townBlock, org.bukkit.entity.Player player, Town town, PlotGroup plotGroup, TownBlockOwner townBlockOwner) void
PlotCommand.parsePlotGroupSetTownBlockType
(String[] split, Resident resident, TownBlock townBlock, PlotGroup group, org.bukkit.entity.Player player, Town town) static void
TownCommand.parseTownMergeCommand
(org.bukkit.command.CommandSender sender, String[] args, @NotNull Town remainingTown, boolean admin) static void
TownCommand.parseTownOutlawCommand
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.parseTownTrustCommand
(org.bukkit.command.CommandSender sender, String[] args, @Nullable Town town) static void
TownCommand.parseTownTrustTownCommand
(org.bukkit.command.CommandSender sender, String[] args, @Nullable Town town) static void
TownCommand.setTownBlockOwnerPermissions
(org.bukkit.command.CommandSender sender, Town town, String[] split) static void
TownCommand.setTownForSale
(Town town, double price, boolean admin) static void
TownCommand.setTownNotForSale
(Town town, boolean admin) static void
Checks if the player is allowed to handle adding invites, then checks through a list of names to be invited, or to have their invites revoked.static void
TownCommand.townAddResident
(Town town, Resident resident) static void
TownCommand.townAddResidents
(org.bukkit.command.CommandSender sender, Town town, List<Resident> invited) static void
TownCommand.townBuy
(org.bukkit.command.CommandSender sender, String[] split, @Nullable Town town, boolean admin) static void
TownCommand.townBuyBonus
(Town town, String[] split, org.bukkit.command.CommandSender sender) Town tries to buy bonus blocks or checks the cost and increase.static void
TownCommand.townBuyBonusTownBlocks
(Town town, int inputN, org.bukkit.command.CommandSender sender) Town buys bonus blocks after checking the configured maximum.static void
TownCommand.townRename
(org.bukkit.command.CommandSender sender, Town town, String newName) static void
TownCommand.townSet
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.townSetBoard
(org.bukkit.command.CommandSender sender, String board, Town town) static void
TownCommand.townSetEmbassyPrice
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.townSetEmbassyTax
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.townSetHomeblock
(org.bukkit.command.CommandSender sender, Town town) static void
TownCommand.townSetMapColor
(org.bukkit.command.CommandSender sender, String[] split, Town town) static void
TownCommand.townSetMayor
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town, Resident resident) static void
TownCommand.townSetName
(org.bukkit.command.CommandSender sender, String[] split, Town town) static void
TownCommand.townSetOutpost
(org.bukkit.command.CommandSender sender, Town town) static void
TownCommand.townSetPlotPrice
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.townSetPlotTax
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.townSetPrimaryJail
(org.bukkit.command.CommandSender sender, Town town) static void
TownCommand.townSetShopPrice
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.townSetShopTax
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.townSetSpawn
(org.bukkit.command.CommandSender sender, Town town, boolean admin) static void
TownCommand.townSetSpawnCost
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.townSetTag
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.townSetTaxes
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static void
TownCommand.townSetTaxPercent
(org.bukkit.command.CommandSender sender, String[] split, Town town) static void
TownCommand.townToggle
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) Modifier and TypeMethodDescriptionstatic void
Deprecated.since 0.100.1.2 useNationCommand.nationAdd(Nation, Town)
instead.static void
NationCommand.nationKick
(org.bukkit.command.CommandSender sender, Nation nation, List<Town> kicking) -
Uses of Town in com.palmergames.bukkit.towny.db
Modifier and TypeMethodDescriptionabstract void
TownyDataSource.deleteTown
(Town town) void
TownyFlatFileSource.deleteTown
(Town town) void
TownySQLSource.deleteTown
(Town town) TownyFlatFileSource.getTownFilename
(Town town) abstract boolean
boolean
boolean
void
Merges the mergeFrom town into the mergeInto town.abstract void
boolean
TownyDatabaseHandler.removeTown
(@NotNull Town town, DeleteTownEvent.Cause cause, @Nullable org.bukkit.command.CommandSender sender, boolean delayFullRemoval) boolean
TownyDataSource.removeTown
(@NotNull Town town, DeleteTownEvent.Cause cause, @Nullable org.bukkit.command.CommandSender sender) abstract boolean
TownyDataSource.removeTown
(@NotNull Town town, DeleteTownEvent.Cause cause, @Nullable org.bukkit.command.CommandSender sender, boolean delayFullRemoval) void
TownyDataSource.removeTown
(Town town) Deprecated.since 0.100.2.9 useTownyDataSource.removeTown(Town, com.palmergames.bukkit.towny.event.DeleteTownEvent.Cause)
instead.boolean
TownyDataSource.removeTown
(Town town, DeleteTownEvent.Cause cause) void
TownyDatabaseHandler.removeTownBlocks
(Town town) abstract void
TownyDataSource.removeTownBlocks
(Town town) void
TownyDatabaseHandler.renameTown
(Town town, String newName) abstract void
TownyDataSource.renameTown
(Town town, String newName) abstract boolean
boolean
boolean
-
Uses of Town in com.palmergames.bukkit.towny.event
Modifier and TypeMethodDescription@Nullable Town
TownSpawnEvent.getFromTown()
Gets the town being teleported from.TownSpawnEvent.getToTown()
Gets the town that the player is teleporting to.BonusBlockPurchaseCostCalculationEvent.getTown()
Returns the target Town.NationAddTownEvent.getTown()
NationPreAddTownEvent.getTown()
NationRemoveTownEvent.getTown()
NewTownEvent.getTown()
PreDeleteTownEvent.getTown()
RenameTownEvent.getTown()
TownAddResidentEvent.getTown()
TownAddResidentRankEvent.getTown()
TownBlockClaimCostCalculationEvent.getTown()
Returns the target Town.TownBlockSettingsChangedEvent.getTown()
TownClaimEvent.getTown()
TownPreAddResidentEvent.getTown()
TownPreClaimEvent.getTown()
The town which is claiming this TownBlock IfTownPreClaimEvent.isHomeblock
is true, then this could be the first TownBlock claimed by a town upon Town-creation.TownPreRenameEvent.getTown()
TownRemoveResidentEvent.getTown()
TownRemoveResidentRankEvent.getTown()
TownUpkeepCalculationEvent.getTown()
TownUpkeepPenalityCalculationEvent.getTown()
ModifierConstructorDescriptionBonusBlockPurchaseCostCalculationEvent
(Town town, double price, int plotAmount) DeleteTownEvent
(@NotNull Town town, @Nullable Resident mayor, @NotNull DeleteTownEvent.Cause cause, @Nullable org.bukkit.command.CommandSender sender) NationAddTownEvent
(Town town, Nation nation) NationPreAddTownEvent
(Nation nation, Town town) NationRemoveTownEvent
(Town town, Nation nation) NewTownEvent
(Town town) PreDeleteTownEvent
(@NotNull Town town, DeleteTownEvent.Cause cause, @Nullable org.bukkit.command.CommandSender sender) RenameTownEvent
(String oldName, Town town) TownAddResidentEvent
(Resident resident, Town town) TownAddResidentRankEvent
(Resident resident, String rank, Town town) TownBlockClaimCostCalculationEvent
(Town town, double price, int plotAmount) TownPreAddResidentEvent
(Town town, Resident resident) TownPreClaimEvent
(Town town, TownBlock townBlock, org.bukkit.entity.Player player, boolean isOutpost, boolean isHomeblock, boolean isOverClaim) This event runs when a town is made and when a town attempts to claim land.TownPreRenameEvent
(Town town, String newName) TownRemoveResidentEvent
(Resident resident, Town town) TownRemoveResidentRankEvent
(Resident resident, String rank, Town town) TownUpkeepCalculationEvent
(Town town, double upkeep) TownUpkeepPenalityCalculationEvent
(Town town, double upkeep) -
Uses of Town in com.palmergames.bukkit.towny.event.damage
Modifier and TypeMethodDescription@Nullable Town
TownyPlayerDamagePlayerEvent.getAttackerTown()
@NotNull Town
TownBlockExplosionTestEvent.getTown()
@Nullable Town
TownBlockPVPTestEvent.getTown()
@Nullable Town
TownyDamageEvent.getTown()
TheTown
where the damage has happened.@Nullable Town
TownyPlayerDamagePlayerEvent.getVictimTown()
ModifierConstructorDescriptionTownBlockExplosionTestEvent
(TownBlock townBlock, Town town, boolean explosion) -
Uses of Town in com.palmergames.bukkit.towny.event.deathprice
ModifierConstructorDescriptionTownPaysDeathPriceEvent
(Account payer, double amount, Resident deadResident, org.bukkit.entity.Player killer, Town town) -
Uses of Town in com.palmergames.bukkit.towny.event.economy
Modifier and TypeMethodDescriptionTownEntersBankruptcyEvent.getTown()
TownPreTransactionEvent.getTown()
TownTransactionEvent.getTown()
ModifierConstructorDescriptionAn event thrown when aTown
becomes bankrupt.TownPreTransactionEvent
(Town town, Transaction transaction) An Cancellable event thrown when aTown
BankAccount
is about to either receive or pay money.TownTransactionEvent
(Town town, Transaction transaction) An event thrown when aTown
BankAccount
either receives or pays money. -
Uses of Town in com.palmergames.bukkit.towny.event.nation
Modifier and TypeMethodDescriptionNationPreInviteTownEvent.getInvitedTown()
Convenience method for getting the town that was invited.NationPreTownKickEvent.getTown()
NationPreTownLeaveEvent.getTown()
NationSanctionTownAddEvent.getTown()
NationSanctionTownRemoveEvent.getTown()
NationTownLeaveEvent.getTown()
PreNewNationEvent.getTown()
ModifierConstructorDescriptionNationPreTownKickEvent
(Nation nation, Town town) Cancellable event thrown when a nation kicks a town using /n kick.NationPreTownLeaveEvent
(Nation nation, Town town) Cancellable event thrown when a player in charge of a town uses /n leave, to leave the nation they are joined in.NationSanctionTownAddEvent
(Nation nation, Town town) NationSanctionTownRemoveEvent
(Nation nation, Town town) NationTownLeaveEvent
(Nation nation, Town town) Event thrown when a player in charge of a town uses /n leave, to leave the nation they are joined in.PreNewNationEvent
(Town town, String nationName) -
Uses of Town in com.palmergames.bukkit.towny.event.player
Modifier and TypeMethodDescriptionPlayerEntersIntoTownBorderEvent.getEnteredTown()
PlayerExitsFromTownBorderEvent.getLeftTown()
@Nullable Town
PlayerKeepsExperienceEvent.getTownOrNull()
@Nullable Town
PlayerKeepsInventoryEvent.getTownOrNull()
ModifierConstructorDescriptionPlayerEntersIntoTownBorderEvent
(org.bukkit.entity.Player player, WorldCoord to, WorldCoord from, Town enteredTown, org.bukkit.event.player.PlayerMoveEvent pme) PlayerExitsFromTownBorderEvent
(org.bukkit.entity.Player player, WorldCoord to, WorldCoord from, Town leftTown, org.bukkit.event.player.PlayerMoveEvent pme) -
Uses of Town in com.palmergames.bukkit.towny.event.plot
-
Uses of Town in com.palmergames.bukkit.towny.event.plot.toggle
-
Uses of Town in com.palmergames.bukkit.towny.event.resident
Modifier and TypeMethodDescriptionResidentJailEvent.getJailTown()
ResidentPreJailEvent.getJailTown()
-
Uses of Town in com.palmergames.bukkit.towny.event.statusscreen
-
Uses of Town in com.palmergames.bukkit.towny.event.teleport
Modifier and TypeMethodDescription@Nullable Town
ResidentSpawnEvent.getFromTown()
Gets the town being teleported from.@Nullable Town
OutlawTeleportEvent.getOutlawTownOrNull()
ResidentSpawnEvent.getToTown()
Gets the town that the player is teleporting to.OutlawTeleportEvent.getTown()
ModifierConstructorDescriptionOutlawTeleportEvent
(Resident outlaw, Town town, org.bukkit.Location loc) -
Uses of Town in com.palmergames.bukkit.towny.event.time.dailytaxes
Modifier and TypeMethodDescriptionPreTownPaysNationTaxEvent.getTown()
TownPaysNationConqueredTaxEvent.getTown()
ModifierConstructorDescriptionPreTownPaysNationTaxEvent
(Town town, Nation nation, double tax) Cancellable event that precedes a town paying the nation tax.TownPaysNationConqueredTaxEvent
(Town town, Nation nation, double tax) Cancellable event that precedes a town paying the nation's conquered tax. -
Uses of Town in com.palmergames.bukkit.towny.event.town
Modifier and TypeMethodDescriptionTownAddAlliedTownEvent.getNewAlly()
TownAddEnemiedTownEvent.getNewEnemy()
TownMergeEvent.getRemainingTown()
TownPreMergeEvent.getRemainingTown()
TownRemoveAlliedTownEvent.getRemovedAlly()
TownRemoveEnemiedTownEvent.getRemovedEnemy()
TownPreMergeEvent.getSuccumbingTown()
TownAddAlliedTownEvent.getTown()
TownAddEnemiedTownEvent.getTown()
TownCalculateTownLevelNumberEvent.getTown()
TownConqueredEvent.getTown()
The town which has become conquered.TownIsTownOverClaimedEvent.getTown()
TownKickEvent.getTown()
TownLeaveEvent.getTown()
TownListDisplayedNumResidentsCalculationEvent.getTown()
TownMapColourLocalCalculationEvent.getTown()
TownMapColourNationalCalculationEvent.getTown()
TownMayorChangedEvent.getTown()
TownMayorChangeEvent.getTown()
TownMayorChosenBySuccessionEvent.getTown()
TownOutlawAddEvent.getTown()
TownOutlawRemoveEvent.getTown()
TownPreInvitePlayerEvent.getTown()
Convenience method for getting the town that sent the invite.@Nullable Town
TownPreReclaimEvent.getTown()
TownPreRemoveResidentEvent.getTown()
TownPreRuinedEvent.getTown()
TownPreSetHomeBlockEvent.getTown()
TownPreUnclaimCmdEvent.getTown()
@Nullable Town
TownPreUnclaimEvent.getTown()
TownReclaimedEvent.getTown()
The ruined town which has been reclaimed.TownRemoveAlliedTownEvent.getTown()
TownRemoveEnemiedTownEvent.getTown()
TownRuinedEvent.getTown()
The town which is falling into ruin.@NotNull Town
TownSetOutpostSpawnEvent.getTown()
@NotNull Town
TownSetSpawnEvent.getTown()
TownTrustAddEvent.getTown()
TownTrustRemoveEvent.getTown()
TownTrustTownAddEvent.getTown()
TownTrustTownRemoveEvent.getTown()
@Nullable Town
TownUnclaimEvent.getTown()
TownUnconquerEvent.getTown()
TownCedePlotEvent.getTownGivingPlot()
TownCedePlotEvent.getTownReceivingPlot()
TownTrustTownAddEvent.getTrustedTown()
TownTrustTownRemoveEvent.getTrustedTown()
ModifierConstructorDescriptionTownAddAlliedTownEvent
(Town town, Town newAlly) TownAddEnemiedTownEvent
(Town town, Town newAlly) TownCalculateTownLevelNumberEvent
(Town town, int predeterminedLevelNumber) An event that is thrown which allows other plugins to alter a Town's TownLevel Number.TownCedePlotEvent
(Town townGivingPlot, Town townGainingPlot, TownBlock townBlock) TownConqueredEvent
(Town town) TownLeaveEvent
(Resident resident, Town town) TownListDisplayedNumResidentsCalculationEvent
(int displayedValue, Town town) TownMapColourLocalCalculationEvent
(Town town, String mapColorHexCode) TownMapColourNationalCalculationEvent
(Town town, String mapColorHexCode) TownMergeEvent
(Town remainingTown, String succumbingTownName, UUID succumbingTownUUID) TownOutlawAddEvent
(org.bukkit.command.CommandSender sender, Resident outlawedResident, Town town) TownOutlawRemoveEvent
(org.bukkit.command.CommandSender sender, Resident outlawedResident, Town town) TownPreMergeEvent
(Town remainingTown, Town succumbingTown) TownPreReclaimEvent
(Town town, Resident resident, org.bukkit.entity.Player player) TownPreRemoveResidentEvent
(Resident resident, Town town) TownPreRuinedEvent
(Town town, DeleteTownEvent.Cause cause, org.bukkit.command.CommandSender sender) TownPreSetHomeBlockEvent
(Town town, TownBlock townBlock, org.bukkit.entity.Player player) TownPreUnclaimCmdEvent
(Town town, Resident resident, TownyWorld world, List<WorldCoord> selection) Constructs the TownPreUnclaimCmdEvent and stores data an external war plugin may use.TownPreUnclaimEvent
(Town town, TownBlock townBlock) TownReclaimedEvent
(Town town, Resident resident) TownRemoveAlliedTownEvent
(Town town, Town newAlly) TownRemoveEnemiedTownEvent
(Town town, Town newAlly) TownRuinedEvent
(Town town, String oldMayorName) TownSetOutpostSpawnEvent
(Town town, org.bukkit.entity.Player player, org.bukkit.Location newSpawn) TownSetSpawnEvent
(Town town, org.bukkit.entity.Player player, org.bukkit.Location newSpawn) TownTrustAddEvent
(org.bukkit.command.CommandSender sender, Resident trustedResident, Town town) TownTrustRemoveEvent
(org.bukkit.command.CommandSender sender, Resident trustedResident, Town town) TownTrustTownAddEvent
(org.bukkit.command.CommandSender sender, Town trustTown, Town town) TownTrustTownRemoveEvent
(org.bukkit.command.CommandSender sender, Town trustTown, Town town) TownUnclaimEvent
(Town town, WorldCoord worldCoord, boolean isOverClaim) TownUnconquerEvent
(Town town) -
Uses of Town in com.palmergames.bukkit.towny.event.town.toggle
ModifierConstructorDescriptionTownToggleEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin) A generic cancellable event thrown when a player uses the /town toggle {args} command.TownToggleExplosionEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin, boolean newState) TownToggleFireEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin, boolean newState) TownToggleMobsEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin, boolean newState) TownToggleNationZoneEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin, boolean newState) TownToggleNeutralEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin, boolean newState) TownToggleOpenEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin, boolean newState) TownTogglePublicEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin, boolean newState) TownTogglePVPEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin, boolean newState) TownToggleTaxPercentEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin, boolean newState) TownToggleUnknownEvent
(org.bukkit.command.CommandSender sender, Town town, boolean admin, String[] args) An event to be used by other plugins to simulate a /nation toggle {arguments} command. -
Uses of Town in com.palmergames.bukkit.towny.event.townblockstatus
ModifierConstructorDescriptionEvent thrown when Towny would return a TownBlockStatus of NationZone, used by the Towny PlayerCache, which would provide a protective bubble surrounding towns which belong to nations. -
Uses of Town in com.palmergames.bukkit.towny.exceptions
ModifierConstructorDescriptionEmptyTownException
(Town town) EmptyTownException
(Town town, EmptyNationException emptyNationException) -
Uses of Town in com.palmergames.bukkit.towny.object
Modifier and TypeMethodDescriptionNation.getCapital()
TownyWorld.getClosestTownWithNationFromCoord
(Coord key, Town nearestTown) Returns the closest town with a nation from a given coord (key).Resident.getJailTown()
PlotGroup.getTown()
Resident.getTown()
TownBlock.getTown()
@Nullable Town
Resident.getTownOrNull()
Relatively safe to use after confirming there is a town usingResident.hasTown()
.@Nullable Town
TownBlock.getTownOrNull()
Relatively safe to use after confirmingTownBlock.hasTown()
is true orTownyAPI.isWilderness(org.bukkit.Location)
is false.@Nullable Town
WorldCoord.getTownOrNull()
Relatively safe to use ifWorldCoord.hasTownBlock()
has already been used.Modifier and TypeMethodDescriptionNation.gatherOutOfRangeTowns
(List<Town> towns, Town capital) Deprecated.since 0.100.0.9 useProximityUtil.gatherOutOfRangeTowns(Nation)
instead.Town.getAllies()
Resident.getEmbassyTowns()
Gets a list of Towns which the given resident owns embassy plots in.Town.getEnemies()
Town.getMutualAllies()
Nation.getSanctionedTowns()
Nation.getTowns()
TownyWorld.getTowns()
Resident.getTownsOutlawedIn()
Town.getTrustedTowns()
Modifier and TypeMethodDescriptionvoid
void
void
Nation.addSanctionedTown
(Town town) void
void
void
Town.addTrustedTown
(Town town) void
Nation.forceSetCapital
(Town capital) Only to be called from the loading methods.Nation.gatherOutOfRangeTowns
(List<Town> towns, Town capital) Deprecated.since 0.100.0.9 useProximityUtil.gatherOutOfRangeTowns(Nation)
instead.TownyWorld.getClosestTownWithNationFromCoord
(Coord key, Town nearestTown) Returns the closest town with a nation from a given coord (key).int
TownyWorld.getMinDistanceFromOtherPlotsOwnedByTown
(Coord key, Town town) Returns the distance to the closest townblock from the given coord, for the give town.int
TownyWorld.getMinDistanceFromOtherTowns
(Coord key, Town homeTown) Deprecated.since 0.99.0.2 useTownyWorld.getMinDistanceFromOtherTownsHomeBlocks(Coord, Town)
instead.int
TownyWorld.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
TownyWorld.getMinDistanceFromOtherTownsPlots
(Coord key, Town homeTown) Checks the distance from a another town's plots.double
double
TownyWorld.getTownBlocks
(Town town) boolean
boolean
boolean
Town.hasMutualAlly
(Town town) boolean
Nation.hasSanctionedTown
(Town town) boolean
boolean
boolean
boolean
Town.hasTrustedTown
(Town town) boolean
Town.isAlliedWith
(Town othertown) boolean
void
Town.removeAlly
(Town town) void
Town.removeEnemy
(Town town) void
Nation.removeSanctionedTown
(Town town) protected void
Nation.removeTown
(Town town) Should only be called by Town.removeNation(); Removes town fromNation.towns
list and will choose a new Capital if necessary.void
TownyWorld.removeTown
(Town town) void
Town.removeTrustedTown
(Town town) void
Nation.setCapital
(Town capital) void
void
void
void
void
Modifier and TypeMethodDescriptionNation.gatherOutOfRangeTowns
(List<Town> towns, Town capital) Deprecated.since 0.100.0.9 useProximityUtil.gatherOutOfRangeTowns(Nation)
instead.void
Town.loadAllies
(List<Town> towns) Only to be used when loading the database.void
Town.loadEnemies
(List<Town> towns) Only to be used when loading the database.void
Town.loadTrustedTowns
(List<Town> towns) Only to be used when loading the database. -
Uses of Town in com.palmergames.bukkit.towny.object.comparators
Modifier and TypeFieldDescriptionstatic final Comparator<Town>
TownComparators.BY_BANKRUPT
static final Comparator<Town>
TownComparators.BY_RUINED
-
Uses of Town in com.palmergames.bukkit.towny.object.inviteobjects
ModifierConstructorDescriptionPlayerJoinTownInvite
(org.bukkit.command.CommandSender directSender, Resident receiver, Town sender) TownJoinNationInvite
(org.bukkit.command.CommandSender directSender, Town receiver, Nation sender) -
Uses of Town in com.palmergames.bukkit.towny.object.jail
-
Uses of Town in com.palmergames.bukkit.towny.object.notification
-
Uses of Town in com.palmergames.bukkit.towny.object.spawnlevel
Modifier and TypeMethodDescriptionvoid
TownSpawnLevel.checkIfAllowed
(org.bukkit.entity.Player player, Town town) double
-
Uses of Town in com.palmergames.bukkit.towny.permissions
Modifier and TypeMethodDescriptionstatic void
TownyPerms.updateTownPerms
(Town town) Update the permissions for all residents of a town (if online) -
Uses of Town in com.palmergames.bukkit.towny.tasks
Modifier and TypeMethodDescriptionprotected void
DailyTimerTask.collectTownTaxes
(Town town) Collect taxes due to the town from it's residents.ModifierConstructorDescriptionResidentPurge
(org.bukkit.command.CommandSender sender, long deleteTime, boolean townless, @Nullable Town town) ResidentPurge
(org.bukkit.command.CommandSender sender, long deleteTime, boolean townless, @Nullable Town town, boolean removeTown) TownClaim
(Towny plugin, org.bukkit.entity.Player player, Town town, List<WorldCoord> selection, boolean isOutpost, boolean claim, boolean forced) TownClaim
(Towny plugin, org.bukkit.entity.Player player, Town town, List<WorldCoord> selection, boolean isOutpost, boolean claim, boolean forced, boolean isOverClaim) -
Uses of Town in com.palmergames.bukkit.towny.utils
Modifier and TypeMethodDescriptionProximityUtil.gatherOutOfRangeTowns
(Nation nation) ProximityUtil.gatherOutOfRangeTowns
(Nation nation, Town capital) Modifier and TypeMethodDescriptionstatic void
NationUtil.addNationComponenents
(Town town, StatusScreen screen, Translator translator) static void
OutpostUtil.addOutpostComponent
(Town town, StatusScreen screen, Translator translator) static void
TownRuinUtil.addRuinedComponents
(Town town, StatusScreen screen, Translator translator) static void
MoneyUtil.addTownMoneyComponents
(Town town, Translator translator, StatusScreen screen) Populates the StatusScreen with the various bank and money components.static void
ProximityUtil.allowTownClaimOrThrow
(TownyWorld world, WorldCoord townBlockToClaim, @Nullable Town town, boolean outpost) static void
ProximityUtil.allowTownClaimOrThrow
(TownyWorld world, WorldCoord townBlockToClaim, @Nullable Town town, boolean outpost, boolean trade) static void
ProximityUtil.allowTownHomeBlockOrThrow
(TownyWorld world, Coord key, @Nullable Town town, boolean newTown) static void
ProximityUtil.allowTownUnclaimOrThrow
(TownyWorld world, WorldCoord townBlockToUnclaim, @Nullable Town town) static void
TownUtil.checkNationResidentsRequirementsOfTown
(Town town) static void
JailUtil.createJailPlot
(TownBlock townBlock, Town town, org.bukkit.Location location) static boolean
AreaSelectionUtil.filterHomeBlock
(Town town, List<WorldCoord> selection) static List<WorldCoord>
AreaSelectionUtil.filterInvalidProximityToHomeblock
(List<WorldCoord> selection, Town town) Returns a list containing only townblocks that can be claimed.static List<WorldCoord>
AreaSelectionUtil.filterInvalidProximityTownBlocks
(List<WorldCoord> selection, Town town) Returns a list containing only townblocks that can be claimed.ProximityUtil.gatherOutOfRangeTowns
(Nation nation, Town capital) static double
MoneyUtil.getEstimatedValueOfTown
(Town town) Get estimated value of town Useful when calculating the allowed debt cap for a town Covers new town costs, claimed land costs, purchased outposts costs.static @NotNull BorderUtil.FloodfillResult
BorderUtil.getFloodFillableCoords
(@NotNull Town town, @NotNull WorldCoord origin) static int
TownUtil.getMaxAllowedNumberOfResidentsWithoutNation
(Town town) static int
TownRuinUtil.getTimeSinceRuining
(Town town) static double
MoneyUtil.getTownDebtCap
(Town town, double upkeep) ResidentUtil.getValidatedResidentsOfTown
(org.bukkit.command.CommandSender sender, Town town, String[] names) Transforms a String[] of names to a list of Residents.static boolean
Is town b an ally of town a?static boolean
Is town b an enemy of town a?static boolean
CombatUtil.isSameNation
(Town a, Town b) Is town b in a nation with town a?static boolean
CombatUtil.isSameTown
(Town a, Town b) Is town b the same town as town a?static boolean
AreaSelectionUtil.isTooCloseToHomeBlock
(WorldCoord wc, Town town) Is the WorldCoord too close to another town's HomeBlock.static boolean
ProximityUtil.isTownTooFarFromNation
(Town town, Town newCapital, List<Town> towns) static void
JailUtil.maxJailedUnjail
(Town town) static void
ResidentUtil.outlawEnteredTown
(Resident outlaw, Town town, org.bukkit.Location location) Method which will teleport an outlaw out of a town, if the player does not have the bypass node and the outlaw teleport feature is active.static void
SpawnUtil.outlawTeleport
(Town town, Resident outlaw) Handles moving outlaws from outside of towns they are outlawed in.static boolean
OutpostUtil.OutpostTests
(Town town, Resident resident, TownyWorld world, Coord key, boolean isAdmin, boolean isPlotSetOutpost) Checks to make sure all requirements are met before an outpost can be claimed.static void
TownRuinUtil.putTownIntoRuinedState
(Town town) Put town into ruined state: 1.static void
TownRuinUtil.reclaimTown
(@NotNull Resident resident, @NotNull Town town) static void
ResidentUtil.reduceResidentCountToFitTownMaxPop
(Town town) Method to remove the newest residents in order to bring a town's population low enough to meet the population cap.static double
MoneyUtil.returnPurchasedBlocksCost
(int alreadyPurchased, int toPurchase, Town town) static void
ProximityUtil.testAdjacentClaimsRulesOrThrow
(WorldCoord townBlockToClaim, Town town, boolean outpost) static void
ProximityUtil.testAdjacentUnclaimsRulesOrThrow
(WorldCoord townBlockToUnclaim, Town town) static void
ProximityUtil.testTownProximityToNation
(Town town, Nation nation) static boolean
TownUtil.townCanHaveThisAmountOfResidents
(Town town, int residentCount, boolean isCapital) static void
MoneyUtil.townDeposit
(org.bukkit.entity.Player player, Resident resident, Town town, Nation nation, int amount) static boolean
TownUtil.townHasEnoughResidentsToBeANationCapital
(Town town) static boolean
TownUtil.townHasEnoughResidentsToJoinANation
(Town town) static void
MoneyUtil.townWithdraw
(org.bukkit.entity.Player player, Resident resident, Town town, int amount) Modifier and TypeMethodDescriptionstatic boolean
ProximityUtil.isTownTooFarFromNation
(Town town, Town newCapital, List<Town> towns) -
Uses of Town in com.palmergames.bukkit.util
TownySettings.getTownLevelWithModifier(int, Town)
instead.