类 MemberRemovedEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.member.MemberRemovedEvent
- 所有已实现的接口:
org.bukkit.event.Cancellable
Event triggered when a member is removed from a Dominion.
This event is triggered when a player removes a member.
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
org.bukkit.event.Event.Result -
构造器概要
构造器构造器说明MemberRemovedEvent(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO dominion, @NotNull MemberDTO member) Constructs a new MemberRemovedEvent. -
方法概要
修饰符和类型方法说明afterRemoved(Consumer<MemberDTO> consumer) Call back after the member is removed.@NotNull DominionDTOGets the dominion.Gets the CompletableFuture that will be completed with the removed MemberDTO.@NotNull MemberDTOGets the member.voidsetDominion(@NotNull DominionDTO dominion) Sets the dominion.voidSets the member.从类继承的方法 cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelled从类继承的方法 cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlers从类继承的方法 org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
构造器详细资料
-
MemberRemovedEvent
public MemberRemovedEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull MemberDTO member) Constructs a new MemberRemovedEvent.- 参数:
operator- the command sender who initiated the eventdominion- the dominion from which the member is removedmember- the member being removed
-
-
方法详细资料
-
setDominion
Sets the dominion.- 参数:
dominion- the dominion to set
-
getDominion
Gets the dominion.- 返回:
- the dominion
-
setMember
Sets the member.- 参数:
member- the member to set
-
getMember
Gets the member.- 返回:
- the member
-
getFutureToComplete
Gets the CompletableFuture that will be completed with the removed MemberDTO.Under most circumstances, you should not need to use this method directly. If you need to perform actions after the member is removed, you should use the
afterRemoved(Consumer)method instead.- 返回:
- the CompletableFuture to be completed
-
afterRemoved
Call back after the member is removed.Use this method to perform actions after the member has been removed (may fail), if you need to do something with the removed member.
- 参数:
consumer- the consumer to handle the removed member- 返回:
- a CompletableFuture that completes when the consumer has been executed
-