Class PlayerActionWithRegionEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
ml.karmaconfigs.api.bukkit.region.event.player.PlayerActionWithRegionEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PlayerActionWithRegionEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.Cancellable
Entity interact directly or indirectly
with 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.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionPlayerActionWithRegionEvent(org.bukkit.entity.Player ent, org.bukkit.block.Block target, InteractAction trigger, Cuboid rg)Initialize the entity interact at region event -
Method Summary
Modifier and TypeMethodDescription@Nullable org.bukkit.block.BlockgetBlock()the block that is involved in the eventstatic org.bukkit.event.HandlerListGet a list of event handlers@NotNull org.bukkit.event.HandlerListGet event handler listGet the region the entity is entering toGet the event triggerbooleanGets the cancellation state of this event.voidsetCancelled(boolean cancel)Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PlayerActionWithRegionEvent
public PlayerActionWithRegionEvent(org.bukkit.entity.Player ent, org.bukkit.block.Block target, InteractAction trigger, Cuboid rg)Initialize the entity interact at region event- Parameters:
ent- the entitytarget- the target block ( if exists )trigger- the action that triggered the eventrg- 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:
isCancelledin interfaceorg.bukkit.event.Cancellable- Returns:
- true if this event is cancelled
-
getBlock
@Nullable public @Nullable org.bukkit.block.Block getBlock()the block that is involved in the event- Returns:
- the block
-
getTrigger
Get the event trigger- Returns:
- the event trigger
-
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:
getHandlersin classorg.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:
setCancelledin interfaceorg.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
-