Class DominionReSizeEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.dominion.modify.DominionModifyEvent
cn.lunadeer.dominion.events.dominion.modify.DominionReSizeEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
Event triggered when a Dominion's size is modified in the Dominion system.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum representing the direction of size change.static enumEnum representing the type of size change.Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionDominionReSizeEvent(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO dominion, @NotNull DominionReSizeEvent.TYPE type, @NotNull DominionReSizeEvent.DIRECTION direction, int size) Constructs a new DominionReSizeEvent. -
Method Summary
Modifier and TypeMethodDescriptionGets the direction of the size change.Gets the new cuboid representing the dominion's size after the change.Gets the old cuboid representing the dominion's size before the change.intgetSize()Gets the size of the size change.getType()Gets the type of the size change.booleanChecks if the economy check is skipped.voidsetDirection(DominionReSizeEvent.DIRECTION direction) Sets the direction of the size change.voidsetSize(int size) Sets the size of the size change.voidsetSkipEconomy(boolean skipEconomy) Sets whether to skip the economy check.Methods inherited from class cn.lunadeer.dominion.events.dominion.modify.DominionModifyEvent
afterModified, getDominion, getFutureToComplete, setDominionMethods inherited from class cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelledMethods inherited from class cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlersMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
DominionReSizeEvent
public DominionReSizeEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull DominionReSizeEvent.TYPE type, @NotNull @NotNull DominionReSizeEvent.DIRECTION direction, int size) Constructs a new DominionReSizeEvent.- Parameters:
operator- the command sender who initiated the eventdominion- the dominion whose size is being changedtype- the type of the size changedirection- the direction of the size changesize- the size of the size change
-
-
Method Details
-
setSkipEconomy
public void setSkipEconomy(boolean skipEconomy) Sets whether to skip the economy check.- Parameters:
skipEconomy- true to skip the economy check, false otherwise
-
isSkipEconomy
public boolean isSkipEconomy()Checks if the economy check is skipped.- Returns:
- true if the economy check is skipped, false otherwise
-
getOldCuboid
Gets the old cuboid representing the dominion's size before the change.- Returns:
- the old cuboid
-
getType
Gets the type of the size change.- Returns:
- the type of the size change
-
getDirection
Gets the direction of the size change.- Returns:
- the direction of the size change
-
getSize
public int getSize()Gets the size of the size change.- Returns:
- the size of the size change
-
setDirection
Sets the direction of the size change.- Parameters:
direction- the direction of the size change
-
setSize
public void setSize(int size) Sets the size of the size change.- Parameters:
size- the size of the size change
-
getNewCuboid
Gets the new cuboid representing the dominion's size after the change.- Returns:
- the new cuboid
-