类 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

public class MemberRemovedEvent extends ResultEvent
Event triggered when a member is removed from a Dominion.

This event is triggered when a player removes a member.

  • 构造器详细资料

    • 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 event
      dominion - the dominion from which the member is removed
      member - the member being removed
  • 方法详细资料

    • setDominion

      public void setDominion(@NotNull @NotNull DominionDTO dominion)
      Sets the dominion.
      参数:
      dominion - the dominion to set
    • getDominion

      @NotNull public @NotNull DominionDTO getDominion()
      Gets the dominion.
      返回:
      the dominion
    • setMember

      public void setMember(@NotNull @NotNull MemberDTO member)
      Sets the member.
      参数:
      member - the member to set
    • getMember

      @NotNull public @NotNull MemberDTO getMember()
      Gets the member.
      返回:
      the member
    • getFutureToComplete

      public CompletableFuture<MemberDTO> 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

      public CompletableFuture<Void> afterRemoved(Consumer<MemberDTO> consumer)
      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