Class ChatPunishmentEvent

java.lang.Object
org.bukkit.event.Event
studio.thevipershow.safechat.api.events.ChatCheckEvent
studio.thevipershow.safechat.api.events.ChatPunishmentEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class ChatPunishmentEvent
extends ChatCheckEvent
implements org.bukkit.event.Cancellable
An event called when a check punishment is going to be triggered. Cancelling this event will cause the punishment to not be executed anymore.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Field Summary

    Fields
    Modifier and Type Field Description
    static org.bukkit.event.HandlerList handlerList  
  • Constructor Summary

    Constructors
    Constructor Description
    ChatPunishmentEvent​(@NotNull Check check)
    This constructor is used to explicitly declare an event as synchronous or asynchronous.
  • Method Summary

    Modifier and Type Method Description
    static @NotNull org.bukkit.event.HandlerList getHandlerList()  
    @NotNull org.bukkit.event.HandlerList getHandlers()  
    boolean isCancelled()
    Gets the cancellation state of this event.
    void setCancelled​(boolean cancel)
    Sets the cancellation state of this event.

    Methods inherited from class studio.thevipershow.safechat.api.events.ChatCheckEvent

    getCheck

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • handlerList

      public static final org.bukkit.event.HandlerList handlerList
  • Constructor Details

    • ChatPunishmentEvent

      public ChatPunishmentEvent​(@NotNull @NotNull Check check)
      This constructor is used to explicitly declare an event as synchronous or asynchronous.
      Parameters:
      check -
  • Method Details

    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
    • getHandlers

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

      public boolean isCancelled()
      Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
      Returns:
      true if this event is cancelled
    • setCancelled

      public void setCancelled​(boolean cancel)
      Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
      Parameters:
      cancel - true if you wish to cancel this event