类 DominionTransferEvent

所有已实现的接口:
org.bukkit.event.Cancellable

@Experimental public class DominionTransferEvent extends DominionModifyEvent
Event triggered when a Dominion is transferred to a new owner in the Dominion system.
  • 构造器详细资料

    • DominionTransferEvent

      public DominionTransferEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull PlayerDTO newOwner)
      Constructs a new DominionTransferEvent.
      参数:
      operator - the command sender who initiated the event
      dominion - the dominion being transferred
      newOwner - the new owner of the dominion
  • 方法详细资料

    • isForce

      public boolean isForce()
      Checks if the transfer is forced.
      返回:
      true if the transfer is forced, false otherwise
    • setForce

      public void setForce(boolean force)
      Sets whether the transfer is forced.
      参数:
      force - true to force the transfer, false otherwise
    • getNewOwner

      @NotNull public @NotNull PlayerDTO getNewOwner()
      Gets the new owner of the dominion.
      返回:
      the new owner
    • getOldOwner

      @NotNull public @NotNull PlayerDTO getOldOwner()
      Gets the old owner of the dominion.
      返回:
      the old owner
    • setNewOwner

      public void setNewOwner(PlayerDTO newOwner)
      Sets the new owner of the dominion.

      Changes made in EventPriority HIGH or higher EventHandler will not take effect. (Default is EventPriority.NORMAL)

      参数:
      newOwner - the new owner to set