Uses of Class
com.palmergames.bukkit.towny.exceptions.TownyException
Package
Description
-
Uses of TownyException in com.palmergames.bukkit.towny
Modifier and TypeMethodDescription@NotNull Resident
TownyAPI.getResidentOrThrow
(@Nullable org.bukkit.entity.Player player) Gets the resident from the given Player or throws a TownyException if that isn't possible.static void
TownySettings.loadNationLevelConfig()
Loads nation levels.static void
TownySettings.loadTownLevelConfig()
Loads town levels.void
TownyAPI.testPlotOwnerOrThrow
(@NotNull Resident resident, @NotNull TownBlock townBlock) Test the townBlock to ensure it is owned by the given Resident, or the Resident is considered a Mayor or Town Assistant or a TownyAdmin.void
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. -
Uses of TownyException in com.palmergames.bukkit.towny.command
Modifier and TypeMethodDescriptionstatic org.bukkit.entity.Player
BaseCommand.catchConsole
(org.bukkit.command.CommandSender sender) static void
BaseCommand.catchPlayer
(org.bukkit.command.CommandSender sender) protected static @NotNull Nation
BaseCommand.getNationFromPlayerOrThrow
(org.bukkit.entity.Player player) protected static @NotNull Nation
BaseCommand.getNationFromResidentOrThrow
(Resident resident) protected static @NotNull Nation
BaseCommand.getNationFromTownOrThrow
(Town town) protected static @NotNull Nation
BaseCommand.getNationOrThrow
(String nationName) protected static @NotNull Resident
BaseCommand.getResidentOrThrow
(String residentName) protected static @NotNull Resident
BaseCommand.getResidentOrThrow
(UUID playerUUID) protected static @NotNull Resident
BaseCommand.getResidentOrThrow
(@Nullable org.bukkit.entity.Player player) protected 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 void
TownyAdminCommand.handleNationMetaCommand
(org.bukkit.command.CommandSender sender, Nation nation, String[] split) static void
TownyAdminCommand.handlePlotMetaCommand
(org.bukkit.entity.Player player, String[] split) static void
TownyAdminCommand.handleResidentMetaCommand
(org.bukkit.command.CommandSender sender, Resident resident, String[] split) static void
TownyAdminCommand.handleTownMetaCommand
(org.bukkit.command.CommandSender sender, Town town, String[] split) void
NationCommand.listNations
(org.bukkit.command.CommandSender sender, String[] split) Send a list of all nations in the universe to player Command: /nation listvoid
ResidentCommand.listResidents
(org.bukkit.command.CommandSender sender) void
Send a list of all towns in the universe to player Command: /town liststatic void
NationCommand.mergeNation
(org.bukkit.command.CommandSender sender, String[] split, @NotNull Nation remainingNation, boolean admin) void
NationCommand.mergeNation
(org.bukkit.entity.Player player, String[] split) void
First stage of adding towns to a nation.void
NationCommand.nationAddOrRemoveAlly
(Resident resident, Nation nation, List<Nation> targetNations, boolean add) void
NationCommand.nationDelete
(org.bukkit.entity.Player player, String[] split) void
NationCommand.nationEnemy
(org.bukkit.entity.Player player, String[] split) void
NationCommand.nationKick
(org.bukkit.entity.Player player, String[] names) void
NationCommand.nationLeave
(org.bukkit.entity.Player player) void
NationCommand.nationRank
(org.bukkit.entity.Player player, String[] split) static void
NationCommand.nationSanctionTown
(org.bukkit.command.CommandSender sender, Nation nation, String[] args) static void
NationCommand.nationSet
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Nation nation) static void
NationCommand.nationSetConqueredTax
(org.bukkit.command.CommandSender sender, String[] split, Nation nation) static void
NationCommand.nationSetTaxPercentCap
(org.bukkit.command.CommandSender sender, String[] split, Nation nation) static void
NationCommand.nationSpawn
(org.bukkit.entity.Player player, String[] split, boolean ignoreWarning) Performs final checks before sending to SpawnUtil.static void
NationCommand.nationToggle
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Nation nation) 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.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) static void
TownCommand.newTown
(org.bukkit.entity.Player player, String name, Resident resident, boolean noCharge) Create a new town.static void
TownCommand.newTown
(org.bukkit.entity.Player player, String name, Resident resident, boolean noCharge, boolean adminCreated) Create a new town.void
TownyAdminCommand.parseAdminNationCommand
(org.bukkit.command.CommandSender sender, String[] split) void
TownyAdminCommand.parseAdminResidentCommand
(org.bukkit.command.CommandSender sender, String[] split) void
TownyAdminCommand.parseAdminTownCommand
(org.bukkit.command.CommandSender sender, String[] split) void
TownyAdminCommand.parseAdminUnclaimCommand
(org.bukkit.entity.Player player, String[] split) void
PlotCommand.parseDistrictAdd
(String[] split, TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parseDistrictDelete
(TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parseDistrictRemove
(TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parseDistrictRename
(String[] split, TownBlock townBlock, org.bukkit.entity.Player player) void
NationCommand.parseNationCommand
(org.bukkit.entity.Player player, String[] split) void
PlotCommand.parsePlotClaim
(org.bukkit.entity.Player player, String[] args, Resident resident, TownBlock townBlock) void
PlotCommand.parsePlotClear
(Resident resident, TownBlock townBlock) void
PlotCommand.parsePlotCommand
(org.bukkit.entity.Player player, String[] split) void
PlotCommand.parsePlotEvict
(Resident resident, TownBlock townBlock) void
PlotCommand.parsePlotForSale
(org.bukkit.entity.Player player, String[] split, Resident resident, TownBlock townBlock) 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.parsePlotGroupPerm
(String[] split, Resident resident, TownBlock townBlock, org.bukkit.entity.Player player) void
PlotCommand.parsePlotGroupRemove
(TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parsePlotGroupRename
(String[] split, TownBlock townBlock, org.bukkit.entity.Player player) void
PlotCommand.parsePlotGroupSet
(String[] split, Resident resident, TownBlock townBlock, org.bukkit.entity.Player player, Town town) void
PlotCommand.parsePlotGroupSetTownBlockType
(String[] split, Resident resident, TownBlock townBlock, PlotGroup group, org.bukkit.entity.Player player, Town town) void
PlotCommand.parsePlotGroupToggle
(String[] split, TownBlock townBlock, org.bukkit.entity.Player player, Resident resident) void
PlotCommand.parsePlotGroupTrust
(String[] split, TownBlock townBlock, org.bukkit.entity.Player player) void
PlotCommand.parsePlotNotForSale
(org.bukkit.entity.Player player, String[] args, Resident resident, TownBlock townBlock) void
PlotCommand.parsePlotPermCommand
(org.bukkit.entity.Player player, String[] args) void
PlotCommand.parsePlotSet
(org.bukkit.entity.Player player, String[] split, Resident resident, TownBlock townBlock) void
PlotCommand.parsePlotSetName
(org.bukkit.entity.Player player, String[] name, TownBlock townBlock) void
PlotCommand.parsePlotSetOutpost
(org.bukkit.entity.Player player, Resident resident, TownBlock townBlock, boolean spawn) static void
PlotCommand.parsePlotTrustCommand
(org.bukkit.entity.Player player, String[] args) void
PlotCommand.parsePlotUnclaim
(org.bukkit.entity.Player player, String[] split, Resident resident) void
ResidentCommand.parseResidentCommand
(org.bukkit.entity.Player player, String[] split) void
TownyAdminCommand.parseToggleCommand
(org.bukkit.command.CommandSender sender, String[] split) static void
TownCommand.parseTownClaimCommand
(org.bukkit.entity.Player player, String[] split) static void
TownCommand.parseTownMergeCommand
(org.bukkit.command.CommandSender sender, String[] args, @NotNull Town remainingTown, boolean admin) static void
TownCommand.parseTownMergeCommand
(org.bukkit.entity.Player player, String[] args) 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.parseTownUnclaimCommand
(org.bukkit.entity.Player player, String[] split) void
TownyAdminCommand.parseTownyAdminCommand
(org.bukkit.command.CommandSender sender, String[] split) void
TownyWorldCommand.parseWorldCommand
(org.bukkit.command.CommandSender sender, String[] split) void
PlotCommand.plotGroupToggle
(org.bukkit.entity.Player player, Resident resident, PlotGroup plotGroup, String[] split) Toggle the plot group flags for pvp/explosion/fire/mobs (if town/world permissions allow)void
PlotCommand.plotToggle
(org.bukkit.entity.Player player, Resident resident, TownBlock townBlock, String[] split) Toggle the plots flags for pvp/explosion/fire/mobs (if town/world permissions allow)void
Remove residents who havn't logged in for X amount of days.static void
ResidentCommand.residentFriend
(org.bukkit.entity.Player player, String[] split, boolean admin, Resident resident) void
ResidentCommand.residentSet
(org.bukkit.entity.Player player, String[] split) Command: /resident set [] ... []void
PlotCommand.setPlotForSale
(Resident resident, WorldCoord worldCoord, double forSale) Set the plot for sale/not for sale if permittedstatic void
TownCommand.setTownBlockOwnerPermissions
(org.bukkit.command.CommandSender sender, Town town, String[] split) 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.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.void
TownCommand.townDelete
(org.bukkit.entity.Player player, String[] split) static void
Transforms a list of names into a list of residents to be kicked.void
TownCommand.townLeave
(org.bukkit.entity.Player player) void
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.townSetSurname
(org.bukkit.command.CommandSender sender, String[] split, boolean admin) 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.townSetTitle
(@NotNull org.bukkit.command.CommandSender sender, @NotNull String[] split, boolean admin) static void
TownCommand.townSpawn
(org.bukkit.entity.Player player, String[] split, Boolean outpost, boolean ignoreWarning) Wrapper for the townSpawn() method.static void
TownCommand.townToggle
(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) void
TownyWorldCommand.worldToggle
(org.bukkit.command.CommandSender sender, TownyWorld world, String[] split) -
Uses of TownyException in com.palmergames.bukkit.towny.event
Modifier and TypeMethodDescriptionvoid
ResidentModesInitializeEvent.registerMode
(@NotNull AbstractResidentMode mode) Registers a new ResidentMode.void
TownBlockTypeRegisterEvent.registerType
(@NotNull TownBlockType type) Registers a new type. -
Uses of TownyException in com.palmergames.bukkit.towny.exceptions
Modifier and TypeClassDescriptionclass
class
class
class
class
class
class
class
class
class
-
Uses of TownyException in com.palmergames.bukkit.towny.invites
Modifier and TypeMethodDescriptionvoid
Invite.accept()
Runs the accept code for the given invitation.static void
InviteHandler.acceptInvite
(Invite invite) -
Uses of TownyException in com.palmergames.bukkit.towny.object
Modifier and TypeMethodDescriptionfinal void
Government.depositToBank
(Resident resident, int amount) Puts money into the bank.void
Town.forceSetHomeBlock
(TownBlock homeBlock) Only to be called from the Loading methods.void
Town.forceSetMayor
(Resident mayor) Sets a resident to become mayor.double
Town.getBonusBlockCostN
(int n) Town.getHomeBlock()
Resident.getNation()
org.bukkit.Location
Town.getOutpostSpawn
(Integer index) Return the Location for this Outpost index.@NotNull org.bukkit.Location
Nation.getSpawn()
@NotNull org.bukkit.Location
SpawnLocation.getSpawn()
Get the spawn location of this object.@NotNull org.bukkit.Location
Town.getSpawn()
double
Town.getTownBlockCostN
(int inputN) static void
TownBlockTypeHandler.registerType
(@NotNull TownBlockType type) Registers a new type.void
void
SpawnLocation.setSpawn
(@Nullable org.bukkit.Location spawn) Sets the spawn point of this object.void
TownBlock.setType
(TownBlockType type, Resident resident) void
TownBlock.testTownMembershipAgePreventsThisClaimOrThrow
(Resident resident) Tests whether a Resident's Town membership age (join date) is too high or low, preventing them from claiming this TownBlock personally with /plot claim.final void
Government.withdrawFromBank
(Resident resident, int amount) Takes money from the bank. -
Uses of TownyException in com.palmergames.bukkit.towny.object.inviteobjects
-
Uses of TownyException in com.palmergames.bukkit.towny.object.resident.mode
Modifier and TypeMethodDescriptionstatic void
ResidentModeHandler.registerMode
(@NotNull AbstractResidentMode mode) Registers a new ResidentMode.static void
ResidentModeHandler.toggleMode
(Resident resident, AbstractResidentMode mode, boolean notify) Will attempt to toggle on or off, a AbstractResidentMode on a Resident.static void
ResidentModeHandler.toggleMode
(Resident resident, String name, boolean notify) Will attempt to toggle on or off, a named mode on a Resident.static void
ResidentModeHandler.toggleMode
(org.bukkit.entity.Player player, String name, boolean notify) Will attempt to toggle on or off, a named mode on a Player.static void
ResidentModeHandler.toggleModes
(org.bukkit.entity.Player player, String[] names, boolean notify) Will clear a Player's modes and then apply all of the given named Modes. -
Uses of TownyException in com.palmergames.bukkit.towny.object.spawnlevel
Modifier and TypeMethodDescriptionvoid
NationSpawnLevel.checkIfAllowed
(org.bukkit.entity.Player player, Nation nation) void
TownSpawnLevel.checkIfAllowed
(org.bukkit.entity.Player player, Town town) -
Uses of TownyException in com.palmergames.bukkit.towny.utils
Modifier and TypeMethodDescriptionstatic 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
JailUtil.createJailPlot
(TownBlock townBlock, Town town, org.bukkit.Location location) static double
MoneyUtil.getMoneyAboveZeroOrThrow
(String input) static String
ResidentUtil.nextNpcName()
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 List
<WorldCoord> AreaSelectionUtil.selectWorldCoordArea
(TownBlockOwner owner, WorldCoord pos, String[] args) Method to select a List<WorldCoord> of coordinates.static List
<WorldCoord> AreaSelectionUtil.selectWorldCoordArea
(TownBlockOwner owner, WorldCoord pos, String[] args, boolean claim) Method to select a List<WorldCoord> of coordinates.static void
SpawnUtil.sendToTownySpawn
(org.bukkit.entity.Player player, String[] split, TownyObject townyObject, String notAffordMSG, boolean outpost, boolean ignoreWarn, SpawnType spawnType) Central method used for /res, /t, /n, /ta spawn commands.static void
ProximityUtil.testAdjacentAddDistrictRulesOrThrow
(WorldCoord townBlockToClaim, Town town, District district, int minAdjacentBlocks) static void
ProximityUtil.testAdjacentClaimsRulesOrThrow
(WorldCoord townBlockToClaim, Town town, boolean outpost) static void
ProximityUtil.testAdjacentClaimsRulesOrThrow
(WorldCoord townBlockToClaim, Town town, boolean outpost, int minAdjacentBlocks) static void
ProximityUtil.testAdjacentRemoveDistrictRulesOrThrow
(WorldCoord townBlockToUnclaim, Town town, District district, int minAdjacentBlocks) static void
ProximityUtil.testAdjacentUnclaimsRulesOrThrow
(WorldCoord townBlockToUnclaim, Town town) static void
ProximityUtil.testAdjacentUnclaimsRulesOrThrow
(WorldCoord townBlockToUnclaim, Town town, int minAdjacentBlocks) static void
ProximityUtil.testTownProximityToNation
(Town town, Nation nation) -
Uses of TownyException in com.palmergames.bukkit.util
Modifier and TypeMethodDescriptionstatic String
NameValidation.checkAndFilterTagOrThrow
(String tag) Check and perform regex on Tags given to towns and nations. -
Uses of TownyException in com.palmergames.util
Modifier and TypeMethodDescriptionstatic double
MathUtil.getDoubleOrThrow
(String input) static int
MathUtil.getIntOrThrow
(String input) static int
MathUtil.getPositiveIntOrThrow
(String input)