Package dev.espi.protectionstones.event
Class PSCreateEvent
java.lang.Object
org.bukkit.event.Event
dev.espi.protectionstones.event.PSCreateEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class PSCreateEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Event that is called when a protectionstones region is created, either by a player, or by the plugin.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result -
Constructor Summary
ConstructorsConstructorDescriptionPSCreateEvent(PSRegion psr)PSCreateEvent(PSRegion psr, org.bukkit.entity.Player player) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerListorg.bukkit.entity.PlayerReturns the player that created the protection region, if applicableReturns the region being created.booleanvoidsetCancelled(boolean isCancelled)Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
PSCreateEvent
-
PSCreateEvent
-
-
Method Details
-
getPlayer
public org.bukkit.entity.Player getPlayer()Returns the player that created the protection region, if applicable- Returns:
- the player, or null if the region was not created because of a player
-
getRegion
Returns the region being created.- Returns:
- the region being created
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean isCancelled)- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-