Class PlayerInteractAtRegionEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.entity.EntityEvent
ml.karmaconfigs.api.bukkit.region.event.player.PlayerInteractAtRegionEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class PlayerInteractAtRegionEvent extends org.bukkit.event.entity.EntityEvent implements org.bukkit.event.Cancellable
Entity interact with another entity in a region
  • Nested Class Summary

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

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

    Fields inherited from class org.bukkit.event.entity.EntityEvent

    entity
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlayerInteractAtRegionEvent​(org.bukkit.entity.Entity ent, org.bukkit.entity.Player issuer, Cuboid rg)
    Initialize the entity interact at region event
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Get a list of event handlers
    @NotNull org.bukkit.event.HandlerList
    Get event handler list
    org.bukkit.entity.Player
    Get the entity that EntityEvent.getEntity() interacted with
    Get the region the entity is entering to
    boolean
    Gets the cancellation state of this event.
    void
    setCancelled​(boolean cancel)
    Sets the cancellation state of this event.

    Methods inherited from class org.bukkit.event.entity.EntityEvent

    getEntity, getEntityType

    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
  • Constructor Details

    • PlayerInteractAtRegionEvent

      public PlayerInteractAtRegionEvent(org.bukkit.entity.Entity ent, org.bukkit.entity.Player issuer, Cuboid rg)
      Initialize the entity interact at region event
      Parameters:
      ent - the entity
      issuer - the player that interacted with entity
      rg - the region the entity has interacted in
  • Method Details

    • 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
    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Get the entity that EntityEvent.getEntity() interacted with
      Returns:
      the target entity
    • getRegion

      public Cuboid getRegion()
      Get the region the entity is entering to
      Returns:
      the event region
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Get event handler list
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      event handler list
    • 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
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Get a list of event handlers
      Returns:
      a list of event handlers