类 DominionModifyEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.dominion.modify.DominionModifyEvent
- 所有已实现的接口:
org.bukkit.event.Cancellable
- 直接已知子类:
DominionRenameEvent,DominionReSizeEvent,DominionSetEnvFlagEvent,DominionSetGuestFlagEvent,DominionSetMapColorEvent,DominionSetMessageEvent,DominionSetTpLocationEvent,DominionTransferEvent
Event triggered when a Dominion is modified in the Dominion system.
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
org.bukkit.event.Event.Result -
构造器概要
构造器构造器说明DominionModifyEvent(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO dominion) Constructs a new DominionModifyEvent. -
方法概要
修饰符和类型方法说明afterModified(Consumer<DominionDTO> consumer) Call back after the dominion is modified.@NotNull DominionDTOReturns the dominion to be modified.Gets the CompletableFuture that will be completed with the created DominionDTO.voidsetDominion(@NotNull DominionDTO dominion) Sets the dominion to be modified.从类继承的方法 cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelled从类继承的方法 cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlers从类继承的方法 org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
构造器详细资料
-
DominionModifyEvent
public DominionModifyEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion) Constructs a new DominionModifyEvent.- 参数:
operator- the command sender who initiated the eventdominion- the dominion being modified
-
-
方法详细资料
-
getFutureToComplete
Gets the CompletableFuture that will be completed with the created DominionDTO.Under most circumstances, you should not need to use this method directly. If you need to perform actions after the dominion is modified, you should use the
afterModified(Consumer)method instead.- 返回:
- the CompletableFuture to be completed
-
afterModified
Call back after the dominion is modified.Use this method to perform actions after the dominion has been modified.
- 参数:
consumer- the consumer to handle the created dominion- 返回:
- a CompletableFuture that completes when the consumer has been executed
-
getDominion
Returns the dominion to be modified.This method retrieves the dominion that is going to be modified by this event. To get the modified dominion after the event is processed, use the
afterModified(Consumer)method to register a callback.- 返回:
- the dominion
-
setDominion
Sets the dominion to be modified.This method can only change which dominion will be modified.
- 参数:
dominion- the dominion to set
-