类 MemberAddedEvent
java.lang.Object
org.bukkit.event.Event
cn.lunadeer.dominion.events.CallableEvent
cn.lunadeer.dominion.events.ResultEvent
cn.lunadeer.dominion.events.member.MemberAddedEvent
- 所有已实现的接口:
org.bukkit.event.Cancellable
Event triggered when a member is added to a Dominion.
-
嵌套类概要
从类继承的嵌套类/接口 org.bukkit.event.Event
org.bukkit.event.Event.Result -
构造器概要
构造器构造器说明MemberAddedEvent(@NotNull org.bukkit.command.CommandSender operator, @NotNull DominionDTO dominion, @NotNull PlayerDTO player) Constructs a new MemberAddedEvent. -
方法概要
修饰符和类型方法说明afterAdded(Consumer<MemberDTO> consumer) Call back after the member is added.@NotNull DominionDTOGets the dominion.Gets the CompletableFuture that will be completed with the added MemberDTO.@Nullable MemberDTO已过时, 待删除: 此 API 元素将从以后的版本中删除。@NotNull PlayerDTOGets the player.voidsetDominion(@NotNull DominionDTO dominion) Sets the dominion.void已过时, 待删除: 此 API 元素将从以后的版本中删除。voidSets the player.从类继承的方法 cn.lunadeer.dominion.events.ResultEvent
getOperator, isCancelled, setCancelled从类继承的方法 cn.lunadeer.dominion.events.CallableEvent
call, getHandlerList, getHandlers从类继承的方法 org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
构造器详细资料
-
MemberAddedEvent
public MemberAddedEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull PlayerDTO player) Constructs a new MemberAddedEvent.- 参数:
operator- the command sender who initiated the eventdominion- the dominion to which the member is addedplayer- the player who is adding the member
-
-
方法详细资料
-
setDominion
Sets the dominion.- 参数:
dominion- the dominion to set
-
getDominion
Gets the dominion.- 返回:
- the dominion
-
setPlayer
Sets the player.- 参数:
player- the player to set
-
getPlayer
Gets the player.- 返回:
- the player
-
getFutureToComplete
Gets the CompletableFuture that will be completed with the added MemberDTO.Under most circumstances, you should not need to use this method directly. If you need to perform actions after the member is added, you should use the
afterAdded(Consumer)method instead.- 返回:
- the CompletableFuture to be completed
-
afterAdded
Call back after the member is added.Use this method to perform actions after the member has been created (may fail), if you need to do something with the added member.
- 参数:
consumer- the consumer to handle the created member- 返回:
- a CompletableFuture that completes when the consumer has been executed
-
setMember
@Deprecated(since="4.6.0", forRemoval=true) public void setMember(@Nullable @Nullable MemberDTO member) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Sets the newly added member.- 参数:
member- the newly added member
-
getMember
已过时, 待删除: 此 API 元素将从以后的版本中删除。Gets the newly added member. If there is none, returns null. Only has a value if the addition was successful.- 返回:
- the newly added member, or null if none
-