Class DominionSetEnvFlagEvent

All Implemented Interfaces:
org.bukkit.event.Cancellable

public class DominionSetEnvFlagEvent extends DominionModifyEvent
Event triggered when an environmental flag is set for a Dominion in the Dominion system.
  • Constructor Details

    • DominionSetEnvFlagEvent

      public DominionSetEnvFlagEvent(@NotNull @NotNull org.bukkit.command.CommandSender operator, @NotNull @NotNull DominionDTO dominion, @NotNull @NotNull EnvFlag flag, boolean newValue)
      Constructs a new DominionSetEnvFlagEvent.
      Parameters:
      operator - the command sender who initiated the event
      dominion - the dominion for which the flag is being set
      flag - the environmental flag being set
      newValue - the new value of the flag
  • Method Details

    • getFlag

      public EnvFlag getFlag()
      Gets the environmental flag being set.
      Returns:
      the environmental flag
    • getOldValue

      public boolean getOldValue()
      Gets the old value of the environmental flag.
      Returns:
      the old value of the environmental flag
    • getNewValue

      public boolean getNewValue()
      Gets the new value of the environmental flag.
      Returns:
      the new value of the environmental flag
    • setNewValue

      public void setNewValue(boolean newValue)
      Sets the new value of the environmental flag.
      Parameters:
      newValue - the new value to set