Class ClaimCreateEvent

java.lang.Object
org.bukkit.event.Event
net.mathias2246.buildmc.api.event.CustomEvent
net.mathias2246.buildmc.api.event.claims.ClaimCreateEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class ClaimCreateEvent extends CustomEvent implements org.bukkit.event.Cancellable
Called when a claim was created. This event is fired synchronously on the main server thread. Plugins can attach optional metadata to this event via CustomEvent.putMetadata(String, Object).
  • Constructor Details

    • ClaimCreateEvent

      public ClaimCreateEvent(@NotNull @NotNull Claim claim)
      Constructs a new ClaimCreateEvent.
      Parameters:
      claim - the claim that was created
  • Method Details

    • getClaim

      @NotNull public @NotNull Claim getClaim()
      Gets the claim that was created.
      Returns:
      The claim that was created
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Description copied from class: CustomEvent
      Returns the HandlerList for this event type.

      Bukkit requires each concrete event class to define its own static HandlerList instance and to return it from this method. This is necessary for Bukkit’s event registration and dispatch system.

      Specified by:
      getHandlers in class CustomEvent
      Returns:
      the handler list for this event (never null)
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Gets the static list of handlers for this event type.

      Required by the Bukkit event system for registration.

      Returns:
      the handler list
    • isCancelled

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

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