Class ProtectionPreCreationEvent

java.lang.Object
org.bukkit.event.Event
me.angeschossen.chestprotect.api.events.ProtectionPreCreationEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class ProtectionPreCreationEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called before the protection is being created.
  • 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
    Required by Bukkit's event system.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProtectionPreCreationEvent(@NotNull org.bukkit.Location location, @NotNull ProtectPlayer player, @NotNull Type protectionType)
    Construct the event.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Required by Bukkit's event system.
    org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.Location
    Get the location of the protection.
    @NotNull ProtectPlayer
    Get the player.
    @NotNull Type
    Get the type.
    boolean
     
    void
    setCancelled(boolean b)
     

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • handlerList

      public static org.bukkit.event.HandlerList handlerList
      Required by Bukkit's event system.
  • Constructor Details

    • ProtectionPreCreationEvent

      public ProtectionPreCreationEvent(@NotNull @NotNull org.bukkit.Location location, @NotNull @NotNull ProtectPlayer player, @NotNull @NotNull Type protectionType)
      Construct the event.
      Parameters:
      location - location where the protection will be created
      player - the player creating the protection
      protectionType - the type of protection being created
  • Method Details

    • getPlayer

      @NotNull public @NotNull ProtectPlayer getPlayer()
      Get the player.
      Returns:
      player that is creating the protection
    • getLocation

      @NotNull public @NotNull org.bukkit.Location getLocation()
      Get the location of the protection.
      Returns:
      location of the protection
    • getProtectionType

      @NotNull public @NotNull Type getProtectionType()
      Get the type.
      Returns:
      type of the protection
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Required by Bukkit's event system.
      Returns:
      the handler list
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • 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