类 MemberSetFlagEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.member.MemberSetFlagEvent
- 所有已实现的接口:
org.bukkit.event.Cancellable
Event triggered when a member's flag is set in the Dominion system.
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
org.bukkit.event.Event.Result -
构造器概要
构造器构造器说明MemberSetFlagEvent(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO dominion, @NotNull MemberDTO member, @NotNull PriFlag flag, boolean newValue) Constructs a new MemberSetFlagEvent. -
方法概要
修饰符和类型方法说明Call back after the member is set.@NotNull DominionDTOGets the dominion to which the group belongs.getFlag()Gets the flag being set.Gets the CompletableFuture that will be completed with the MemberDTO.Gets the member whose flag is being set.booleanGets the new value of the flag.booleanGets the old value of the flag.voidsetNewValue(boolean newValue) Sets the new value of the flag.从类继承的方法 cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelled从类继承的方法 cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlers从类继承的方法 org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
构造器详细资料
-
MemberSetFlagEvent
public MemberSetFlagEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull MemberDTO member, @NotNull @NotNull PriFlag flag, boolean newValue) Constructs a new MemberSetFlagEvent.- 参数:
operator- the command sender who initiated the eventdominion- the dominion to which the member belongsmember- the member whose flag is being setflag- the flag being setnewValue- the new value of the flag
-
-
方法详细资料
-
getDominion
Gets the dominion to which the group belongs.- 返回:
- the dominion
-
getFlag
Gets the flag being set.- 返回:
- the flag being set
-
getOldValue
public boolean getOldValue()Gets the old value of the flag.- 返回:
- the old value of the flag
-
getNewValue
public boolean getNewValue()Gets the new value of the flag.- 返回:
- the new value of the flag
-
setNewValue
public void setNewValue(boolean newValue) Sets the new value of the flag.- 参数:
newValue- the new value to set
-
getMember
Gets the member whose flag is being set.- 返回:
- the member whose flag is being set
-
getFutureToComplete
Gets the CompletableFuture that will be completed with the MemberDTO.Under most circumstances, you should not need to use this method directly. If you need to perform actions after the member is set, you should use the
afterSet(Consumer)method instead.- 返回:
- the CompletableFuture to be completed
-
afterSet
Call back after the member is set.Use this method to perform actions after the member has been set (may fail), if you need to do something with the set member,
- 参数:
consumer- the consumer to handle the set member- 返回:
- a CompletableFuture that completes when the consumer has been executed
-