Class PunishmentIssuedEvent

java.lang.Object
org.bukkit.event.Event
fr.mathildeuh.youneedme.api.event.PunishmentIssuedEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class PunishmentIssuedEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Fired before a ban/mute/warn/kick is persisted and enforced. punishment.id() is not yet assigned at this point (it is still 0); cancelling stops the punishment entirely.
  • Constructor Details

    • PunishmentIssuedEvent

      public PunishmentIssuedEvent(Punishment punishment)
  • Method Details

    • getPunishment

      public Punishment getPunishment()
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()