Class DominionTransferEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class DominionTransferEvent extends DominionModifyEvent
Event triggered when a Dominion is transferred to a new owner in the Dominion system.
  • Constructor Details

    • DominionTransferEvent

      public DominionTransferEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull PlayerDTO newOwner)
      Constructs a new DominionTransferEvent.
      Parameters:
      operator - the command sender who initiated the event
      dominion - the dominion being transferred
      newOwner - the new owner of the dominion
  • Method Details

    • isForce

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

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

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

      @NotNull public @NotNull PlayerDTO getOldOwner()
      Gets the old owner of the dominion.
      Returns:
      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)

      Parameters:
      newOwner - the new owner to set