Class StargatePlayerDestroyPortalEvent
java.lang.Object
org.bukkit.event.Event
org.sgrewritten.stargate.api.event.portal.StargatePortalEvent
org.sgrewritten.stargate.api.event.portal.StargateEntityPortalEvent
org.sgrewritten.stargate.api.event.portal.DeniableStargatePortalEvent
org.sgrewritten.stargate.api.event.portal.StargatePlayerDestroyPortalEvent
This event should be called whenever a stargate is destroyed
This event can be used to deny or change the cost of a stargate destruction.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionStargatePlayerDestroyPortalEvent
(@NotNull Portal portal, @NotNull org.bukkit.entity.Player player, boolean deny, String denyReason, double cost) Instantiates a new Stargate Destroy Event -
Method Summary
Methods inherited from class org.sgrewritten.stargate.api.event.portal.DeniableStargatePortalEvent
getDeny, getDenyReason, setDeny, setDenyReason
Methods inherited from class org.sgrewritten.stargate.api.event.portal.StargateEntityPortalEvent
getEntity
Methods inherited from class org.sgrewritten.stargate.api.event.portal.StargatePortalEvent
getPortal
Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
StargatePlayerDestroyPortalEvent
public StargatePlayerDestroyPortalEvent(@NotNull @NotNull Portal portal, @NotNull @NotNull org.bukkit.entity.Player player, boolean deny, String denyReason, double cost) Instantiates a new Stargate Destroy Event- Parameters:
portal
-The destroyed portal
player
-The player destroying the portal
deny
-Whether the event should be denied (cancelled)
denyReason
-The message to display if the event is denied
cost
-The cost of destroying the portal
-
-
Method Details
-
getCost
public double getCost()Gets the cost of destroying the portal- Returns:
The cost of destroying the portal
-
setCost
public void setCost(double cost) Sets the cost of destroying the portal- Parameters:
cost
-The cost of destroying the portal
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()Gets a handler-list containing all event handlers- Returns:
A handler-list with all event handlers
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-