Class TownPreUnclaimCmdEvent
java.lang.Object
org.bukkit.event.Event
com.palmergames.bukkit.towny.event.CancellableTownyEvent
com.palmergames.bukkit.towny.event.town.TownPreUnclaimCmdEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
An event fired when a '/town unclaim [args]' command is issued, prior to any
other calculations.
Useful for plugins (like war systems) wanting halt the command in it's tracks. For an example, see Flag War's FlagWarCustomListener.onWarPreUnclaim().
Not to be confused with TownPreUnclaimEvent, which is handled within
the TownyDatabaseHandler.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionTownPreUnclaimCmdEvent(Town town, Resident resident, TownyWorld world, List<WorldCoord> selection) Constructs the TownPreUnclaimCmdEvent and stores data an external war plugin may use. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListgetTown()Methods inherited from class com.palmergames.bukkit.towny.event.CancellableTownyEvent
getCancelMessage, isCancelled, setCancelled, setCancelMessageMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
TownPreUnclaimCmdEvent
public TownPreUnclaimCmdEvent(Town town, Resident resident, TownyWorld world, List<WorldCoord> selection) Constructs the TownPreUnclaimCmdEvent and stores data an external war plugin may use.- Parameters:
town- TheTownabout to process un-claiming (a) plot(s).resident- TheResidentwho initiated the command.world- TheTownyWorldin which the resident is in.selection- The List ofWorldCoordwhich will be unclaimed.
-
-
Method Details
-
getTown
- Returns:
- Gets the
Townwhich would have it's TownBlocks unclaimed.
-
getResident
- Returns:
- Gets the
Residentthat issued the '/t unclaim ...' command.
-
getTownyWorld
- Returns:
- Gets the
TownyWorldwhere the land is being unclaimed.
-
getUnclaimSelection
- Returns:
- Gets the List of
WorldCoordwhich will be unclaimed if this event is not cancelled.
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-