Uses of Class
com.palmergames.bukkit.towny.exceptions.TownyException
Packages that use TownyException
Package
Description
-
Uses of TownyException in com.palmergames.bukkit.towny
Methods in com.palmergames.bukkit.towny that throw TownyExceptionModifier and TypeMethodDescription@NotNull ResidentTownyAPI.getResidentOrThrow(@Nullable org.bukkit.entity.Player player) Gets the resident from the given Player or throws a TownyException if that isn't possible.static voidTownySettings.loadNationLevelConfig()Loads nation levels.static voidTownySettings.loadTownLevelConfig()Loads town levels.voidTownyAPI.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.voidTownyAPI.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.voidTownyAPI.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
Methods in com.palmergames.bukkit.towny.command that throw TownyExceptionModifier and TypeMethodDescriptionstatic org.bukkit.entity.PlayerBaseCommand.catchConsole(org.bukkit.command.CommandSender sender) static voidBaseCommand.catchPlayer(org.bukkit.command.CommandSender sender) protected static @NotNull NationBaseCommand.getNationFromPlayerOrThrow(org.bukkit.entity.Player player) protected static @NotNull NationBaseCommand.getNationFromResidentOrThrow(Resident resident) protected static @NotNull NationBaseCommand.getNationFromTownOrThrow(Town town) protected static @NotNull NationBaseCommand.getNationOrThrow(String nationName) protected static @NotNull ResidentBaseCommand.getResidentOrThrow(String residentName) protected static @NotNull ResidentBaseCommand.getResidentOrThrow(UUID playerUUID) protected static @NotNull ResidentBaseCommand.getResidentOrThrow(@Nullable org.bukkit.entity.Player player) protected static @NotNull TownBaseCommand.getTownFromPlayerOrThrow(org.bukkit.entity.Player player) protected static @NotNull TownBaseCommand.getTownFromResidentOrThrow(@NotNull Resident resident) protected static @NotNull TownBaseCommand.getTownOrThrow(String townName) static voidTownyAdminCommand.handleNationMetaCommand(org.bukkit.command.CommandSender sender, Nation nation, String[] split) static voidTownyAdminCommand.handlePlotMetaCommand(org.bukkit.entity.Player player, String[] split) static voidTownyAdminCommand.handleResidentMetaCommand(org.bukkit.command.CommandSender sender, Resident resident, String[] split) static voidTownyAdminCommand.handleTownMetaCommand(org.bukkit.command.CommandSender sender, Town town, String[] split) voidNationCommand.listNations(org.bukkit.command.CommandSender sender, String[] split) Send a list of all nations in the universe to player Command: /nation listvoidResidentCommand.listResidents(org.bukkit.command.CommandSender sender) voidSend a list of all towns in the universe to player Command: /town liststatic voidNationCommand.mergeNation(org.bukkit.command.CommandSender sender, String[] split, @NotNull Nation remainingNation, boolean admin) voidNationCommand.mergeNation(org.bukkit.entity.Player player, String[] split) voidFirst stage of adding towns to a nation.voidNationCommand.nationAddOrRemoveAlly(Resident resident, Nation nation, List<Nation> targetNations, boolean add) voidNationCommand.nationDelete(org.bukkit.entity.Player player, String[] split) voidNationCommand.nationEnemy(org.bukkit.entity.Player player, String[] split) voidNationCommand.nationKick(org.bukkit.entity.Player player, String[] names) voidNationCommand.nationLeave(org.bukkit.entity.Player player) voidNationCommand.nationRank(org.bukkit.entity.Player player, String[] split) static voidNationCommand.nationSanctionTown(org.bukkit.command.CommandSender sender, Nation nation, String[] args) static voidNationCommand.nationSet(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Nation nation) static voidNationCommand.nationSetConqueredTax(org.bukkit.command.CommandSender sender, String[] split, Nation nation) static voidNationCommand.nationSetTaxPercentCap(org.bukkit.command.CommandSender sender, String[] split, Nation nation) static voidNationCommand.nationSpawn(org.bukkit.entity.Player player, String[] split, boolean ignoreWarning) Performs final checks before sending to SpawnUtil.static voidNationCommand.nationToggle(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Nation nation) static Nationstatic voidNationCommand.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 TownTownCommand.newTown(TownyWorld world, String name, Resident resident, Coord key, org.bukkit.Location spawn, org.bukkit.entity.Player player) static TownTownCommand.newTown(TownyWorld world, String name, Resident resident, Coord key, org.bukkit.Location spawn, org.bukkit.entity.Player player, double cost) static voidTownCommand.newTown(org.bukkit.entity.Player player, String name, Resident resident, boolean noCharge) Create a new town.static voidTownCommand.newTown(org.bukkit.entity.Player player, String name, Resident resident, boolean noCharge, boolean adminCreated) Create a new town.voidTownyAdminCommand.parseAdminNationCommand(org.bukkit.command.CommandSender sender, String[] split) voidTownyAdminCommand.parseAdminResidentCommand(org.bukkit.command.CommandSender sender, String[] split) voidTownyAdminCommand.parseAdminTownCommand(org.bukkit.command.CommandSender sender, String[] split) voidTownyAdminCommand.parseAdminUnclaimCommand(org.bukkit.entity.Player player, String[] split) voidPlotCommand.parseDistrictAdd(String[] split, TownBlock townBlock, org.bukkit.entity.Player player, Town town) voidPlotCommand.parseDistrictDelete(TownBlock townBlock, org.bukkit.entity.Player player, Town town) voidPlotCommand.parseDistrictRemove(TownBlock townBlock, org.bukkit.entity.Player player, Town town) voidPlotCommand.parseDistrictRename(String[] split, TownBlock townBlock, org.bukkit.entity.Player player) voidNationCommand.parseNationCommand(org.bukkit.entity.Player player, String[] split) voidPlotCommand.parsePlotClaim(org.bukkit.entity.Player player, String[] args, Resident resident, TownBlock townBlock) voidPlotCommand.parsePlotClear(Resident resident, TownBlock townBlock) voidPlotCommand.parsePlotCommand(org.bukkit.entity.Player player, String[] split) voidPlotCommand.parsePlotEvict(Resident resident, TownBlock townBlock, String[] split) voidPlotCommand.parsePlotForSale(org.bukkit.entity.Player player, String[] split, Resident resident, TownBlock townBlock) voidPlotCommand.parsePlotGroupAdd(String[] split, TownBlock townBlock, org.bukkit.entity.Player player, Town town) voidPlotCommand.parsePlotGroupDelete(TownBlock townBlock, org.bukkit.entity.Player player, Town town) voidPlotCommand.parsePlotGroupForSale(String[] split, Resident resident, TownBlock townBlock, org.bukkit.entity.Player player, Town town) voidPlotCommand.parsePlotGroupNotForSale(Resident resident, TownBlock townBlock, org.bukkit.entity.Player player, Town town) voidPlotCommand.parsePlotGroupPerm(String[] split, Resident resident, TownBlock townBlock, org.bukkit.entity.Player player) voidPlotCommand.parsePlotGroupRemove(TownBlock townBlock, org.bukkit.entity.Player player, Town town) voidPlotCommand.parsePlotGroupRename(String[] split, TownBlock townBlock, org.bukkit.entity.Player player) voidPlotCommand.parsePlotGroupSet(String[] split, Resident resident, TownBlock townBlock, org.bukkit.entity.Player player, Town town) voidPlotCommand.parsePlotGroupSetTownBlockType(String[] split, Resident resident, TownBlock townBlock, PlotGroup group, org.bukkit.entity.Player player, Town town) voidPlotCommand.parsePlotGroupToggle(String[] split, TownBlock townBlock, org.bukkit.entity.Player player, Resident resident) voidPlotCommand.parsePlotGroupTrust(String[] split, TownBlock townBlock, org.bukkit.entity.Player player) voidPlotCommand.parsePlotNotForSale(org.bukkit.entity.Player player, String[] args, Resident resident, TownBlock townBlock) voidPlotCommand.parsePlotPermCommand(org.bukkit.entity.Player player, String[] args) voidPlotCommand.parsePlotSet(org.bukkit.entity.Player player, String[] split, Resident resident, TownBlock townBlock) voidPlotCommand.parsePlotSetName(org.bukkit.entity.Player player, String[] name, TownBlock townBlock) voidPlotCommand.parsePlotSetOutpost(org.bukkit.entity.Player player, Resident resident, TownBlock townBlock, boolean spawn) static voidPlotCommand.parsePlotTrustCommand(org.bukkit.entity.Player player, String[] args) voidPlotCommand.parsePlotUnclaim(org.bukkit.entity.Player player, String[] split, Resident resident) voidResidentCommand.parseResidentCommand(org.bukkit.entity.Player player, String[] split) voidTownyAdminCommand.parseToggleCommand(org.bukkit.command.CommandSender sender, String[] split) static voidTownCommand.parseTownClaimCommand(org.bukkit.entity.Player player, String[] split) static voidTownCommand.parseTownMergeCommand(org.bukkit.command.CommandSender sender, String[] args, @NotNull Town remainingTown, boolean admin) static voidTownCommand.parseTownMergeCommand(org.bukkit.entity.Player player, String[] args) static voidTownCommand.parseTownOutlawCommand(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.parseTownTrustCommand(org.bukkit.command.CommandSender sender, String[] args, @Nullable Town town) static voidTownCommand.parseTownTrustTownCommand(org.bukkit.command.CommandSender sender, String[] args, @Nullable Town town) static voidTownCommand.parseTownUnclaimCommand(org.bukkit.entity.Player player, String[] split) voidTownyAdminCommand.parseTownyAdminCommand(org.bukkit.command.CommandSender sender, String[] split) voidTownyWorldCommand.parseWorldCommand(org.bukkit.command.CommandSender sender, String[] split) voidPlotCommand.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)voidPlotCommand.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)voidRemove residents who havn't logged in for X amount of days.static voidResidentCommand.residentFriend(org.bukkit.entity.Player player, String[] split, boolean admin, Resident resident) voidResidentCommand.residentSet(org.bukkit.entity.Player player, String[] split) Command: /resident set [] ... []voidPlotCommand.setPlotForSale(Resident resident, WorldCoord worldCoord, double forSale) Set the plot for sale/not for sale if permittedstatic voidTownCommand.setTownBlockOwnerPermissions(org.bukkit.command.CommandSender sender, Town town, String[] split) static voidChecks 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 voidTownCommand.townAddResidents(org.bukkit.command.CommandSender sender, Town town, List<Resident> invited) static voidTownCommand.townBuy(org.bukkit.command.CommandSender sender, String[] split, @Nullable Town town, boolean admin) static voidTownCommand.townBuyBonus(Town town, String[] split, org.bukkit.command.CommandSender sender) Town tries to buy bonus blocks or checks the cost and increase.static voidTownCommand.townBuyBonusTownBlocks(Town town, int inputN, org.bukkit.command.CommandSender sender) Town buys bonus blocks after checking the configured maximum.voidTownCommand.townDelete(org.bukkit.entity.Player player, String[] split) static voidTransforms a list of names into a list of residents to be kicked.voidvoidstatic voidTownCommand.townSet(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.townSetBoard(org.bukkit.command.CommandSender sender, String board, Town town) static voidTownCommand.townSetEmbassyPrice(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.townSetEmbassyTax(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.townSetHomeblock(org.bukkit.command.CommandSender sender, Town town) static voidTownCommand.townSetMapColor(org.bukkit.command.CommandSender sender, String[] split, Town town) static voidTownCommand.townSetMayor(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town, Resident resident) static voidTownCommand.townSetName(org.bukkit.command.CommandSender sender, String[] split, Town town) static voidTownCommand.townSetOutpost(org.bukkit.command.CommandSender sender, Town town) static voidTownCommand.townSetPlotPrice(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.townSetPlotTax(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.townSetPrimaryJail(org.bukkit.command.CommandSender sender, Town town) static voidTownCommand.townSetShopPrice(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.townSetShopTax(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.townSetSpawn(org.bukkit.command.CommandSender sender, Town town, boolean admin) static voidTownCommand.townSetSpawnCost(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.townSetSurname(org.bukkit.command.CommandSender sender, String[] split, boolean admin) static voidTownCommand.townSetTag(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.townSetTaxes(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) static voidTownCommand.townSetTaxPercent(org.bukkit.command.CommandSender sender, String[] split, Town town) static voidTownCommand.townSetTitle(@NotNull org.bukkit.command.CommandSender sender, @NotNull String[] split, boolean admin) static voidTownCommand.townSpawn(org.bukkit.entity.Player player, String[] split, Boolean outpost, boolean ignoreWarning) Wrapper for the townSpawn() method.static voidTownCommand.townToggle(org.bukkit.command.CommandSender sender, String[] split, boolean admin, Town town) voidTownyWorldCommand.worldToggle(org.bukkit.command.CommandSender sender, TownyWorld world, String[] split) -
Uses of TownyException in com.palmergames.bukkit.towny.event
Methods in com.palmergames.bukkit.towny.event that throw TownyExceptionModifier and TypeMethodDescriptionvoidResidentModesInitializeEvent.registerMode(@NotNull AbstractResidentMode mode) Registers a new ResidentMode.voidTownBlockTypeRegisterEvent.registerType(@NotNull TownBlockType type) Registers a new type. -
Uses of TownyException in com.palmergames.bukkit.towny.exceptions
Subclasses of TownyException in com.palmergames.bukkit.towny.exceptionsModifier and TypeClassDescriptionclassclassclassclassclassclassclassclassclassclass -
Uses of TownyException in com.palmergames.bukkit.towny.invites
Methods in com.palmergames.bukkit.towny.invites that throw TownyExceptionModifier and TypeMethodDescriptionvoidInvite.accept()Runs the accept code for the given invitation.static voidInviteHandler.acceptInvite(Invite invite) -
Uses of TownyException in com.palmergames.bukkit.towny.object
Methods in com.palmergames.bukkit.towny.object that throw TownyExceptionModifier and TypeMethodDescriptionfinal voidGovernment.depositToBank(Resident resident, int amount) Puts money into the bank.voidTown.forceSetHomeBlock(TownBlock homeBlock) Only to be called from the Loading methods.voidTown.forceSetMayor(Resident mayor) Sets a resident to become mayor.doubleTown.getBonusBlockCostN(int n) Town.getHomeBlock()Resident.getNation()org.bukkit.LocationTown.getOutpostSpawn(Integer index) Return the Location for this Outpost index.@NotNull org.bukkit.LocationNation.getSpawn()@NotNull org.bukkit.LocationSpawnLocation.getSpawn()Get the spawn location of this object.@NotNull org.bukkit.LocationTown.getSpawn()doubleTown.getTownBlockCostN(int inputN) static voidTownBlockTypeHandler.registerType(@NotNull TownBlockType type) Registers a new type.voidvoidSpawnLocation.setSpawn(@Nullable org.bukkit.Location spawn) Sets the spawn point of this object.voidTownBlock.setType(TownBlockType type, Resident resident) voidTownBlock.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 voidGovernment.withdrawFromBank(Resident resident, int amount) Takes money from the bank. -
Uses of TownyException in com.palmergames.bukkit.towny.object.inviteobjects
Methods in com.palmergames.bukkit.towny.object.inviteobjects that throw TownyException -
Uses of TownyException in com.palmergames.bukkit.towny.object.resident.mode
Methods in com.palmergames.bukkit.towny.object.resident.mode that throw TownyExceptionModifier and TypeMethodDescriptionstatic voidResidentModeHandler.registerMode(@NotNull AbstractResidentMode mode) Registers a new ResidentMode.static voidResidentModeHandler.toggleMode(Resident resident, AbstractResidentMode mode, boolean notify) Will attempt to toggle on or off, a AbstractResidentMode on a Resident.static voidResidentModeHandler.toggleMode(Resident resident, String name, boolean notify) Will attempt to toggle on or off, a named mode on a Resident.static voidResidentModeHandler.toggleMode(org.bukkit.entity.Player player, String name, boolean notify) Will attempt to toggle on or off, a named mode on a Player.static voidResidentModeHandler.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
Methods in com.palmergames.bukkit.towny.object.spawnlevel that throw TownyExceptionModifier and TypeMethodDescriptionvoidNationSpawnLevel.checkIfAllowed(org.bukkit.entity.Player player, Nation nation) voidTownSpawnLevel.checkIfAllowed(org.bukkit.entity.Player player, Town town) -
Uses of TownyException in com.palmergames.bukkit.towny.utils
Methods in com.palmergames.bukkit.towny.utils that throw TownyExceptionModifier and TypeMethodDescriptionstatic voidProximityUtil.allowTownClaimOrThrow(TownyWorld world, WorldCoord townBlockToClaim, @Nullable Town town, boolean outpost) static voidProximityUtil.allowTownClaimOrThrow(TownyWorld world, WorldCoord townBlockToClaim, @Nullable Town town, boolean outpost, boolean trade) static voidProximityUtil.allowTownHomeBlockOrThrow(TownyWorld world, Coord key, @Nullable Town town, boolean newTown) static voidProximityUtil.allowTownUnclaimOrThrow(TownyWorld world, WorldCoord townBlockToUnclaim, @Nullable Town town) static voidJailUtil.createJailPlot(TownBlock townBlock, Town town, org.bukkit.Location location) static doubleMoneyUtil.getMoneyAboveZeroOrThrow(String input) static StringResidentUtil.nextNpcName()static booleanOutpostUtil.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 voidSpawnUtil.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 voidProximityUtil.testAdjacentAddDistrictRulesOrThrow(WorldCoord townBlockToClaim, Town town, District district, int minAdjacentBlocks) static voidProximityUtil.testAdjacentClaimsRulesOrThrow(WorldCoord townBlockToClaim, Town town, boolean outpost) static voidProximityUtil.testAdjacentClaimsRulesOrThrow(WorldCoord townBlockToClaim, Town town, boolean outpost, int minAdjacentBlocks) static voidProximityUtil.testAdjacentRemoveDistrictRulesOrThrow(WorldCoord districtCoordBeingRemoved, Town town, District district, int minAdjacentBlocks) static voidProximityUtil.testAdjacentUnclaimsRulesOrThrow(WorldCoord townBlockToUnclaim, Town town) static voidProximityUtil.testAdjacentUnclaimsRulesOrThrow(WorldCoord townBlockToUnclaim, Town town, int minAdjacentBlocks) static voidProximityUtil.testTownProximityToNation(Town town, Nation nation) -
Uses of TownyException in com.palmergames.bukkit.util
Methods in com.palmergames.bukkit.util that throw TownyExceptionModifier and TypeMethodDescriptionstatic StringNameValidation.checkAndFilterTagOrThrow(String tag) Check and perform regex on Tags given to towns and nations. -
Uses of TownyException in com.palmergames.util
Methods in com.palmergames.util that throw TownyExceptionModifier and TypeMethodDescriptionstatic doubleMathUtil.getDoubleOrThrow(String input) static intMathUtil.getIntOrThrow(String input) static doubleMathUtil.getPositiveDoubleOrThrow(String input) static intMathUtil.getPositiveIntOrThrow(String input)