Class DominionSetMessageEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class DominionSetMessageEvent extends DominionModifyEvent
Event triggered when a message is set for a Dominion in the Dominion system.
  • Constructor Details

    • DominionSetMessageEvent

      public DominionSetMessageEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull DominionSetMessageEvent.TYPE type, @NotNull @NotNull String newMessage)
      Constructs a new DominionSetMessageEvent.
      Parameters:
      operator - the command sender who initiated the event
      dominion - the dominion for which the message is being set
      type - the type of the message being set
      newMessage - the new message content
  • Method Details

    • getOldMessage

      @NotNull public @NotNull String getOldMessage()
      Gets the old message content.
      Returns:
      the old message content
    • getType

      @NotNull public DominionSetMessageEvent.TYPE getType()
      Gets the type of the message being set.
      Returns:
      the type of the message
    • getNewMessage

      @NotNull public @NotNull String getNewMessage()
      Gets the new message content.
      Returns:
      the new message content
    • setNewMessage

      public void setNewMessage(@NotNull @NotNull String newMessage)
      Sets the new message content.

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

      Parameters:
      newMessage - the new message content