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
ConstructorDescriptionTownPreUnclaimCmdEvent
(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.HandlerList
getTown()
Methods inherited from class com.palmergames.bukkit.towny.event.CancellableTownyEvent
getCancelMessage, isCancelled, setCancelled, setCancelMessage
Methods 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
- TheTown
about to process un-claiming (a) plot(s).resident
- TheResident
who initiated the command.world
- TheTownyWorld
in which the resident is in.selection
- The List ofWorldCoord
which will be unclaimed.
-
-
Method Details
-
getTown
- Returns:
- Gets the
Town
which would have it's TownBlocks unclaimed.
-
getResident
- Returns:
- Gets the
Resident
that issued the '/t unclaim ...' command.
-
getTownyWorld
- Returns:
- Gets the
TownyWorld
where the land is being unclaimed.
-
getUnclaimSelection
- Returns:
- Gets the List of
WorldCoord
which 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:
getHandlers
in classorg.bukkit.event.Event
-