Class DeniableStargatePortalEvent
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
- Direct Known Subclasses:
StargateAccessPortalEvent
,StargateListPortalEvent
,StargatePlayerDestroyPortalEvent
A Stargate event which can be denied
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getDeny()
Gets whether the entity should be denied accessGets the reason the stargate access was deniedvoid
setDeny
(boolean deny) Sets whether to deny access to the entityvoid
setDenyReason
(String denyReason) Sets the reason the stargate access was deniedMethods 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, getHandlers, isAsynchronous
-
Method Details
-
getDeny
public boolean getDeny()Gets whether the entity should be denied access- Returns:
Whether the entity should be denied access
-
setDeny
public void setDeny(boolean deny) Sets whether to deny access to the entity- Parameters:
deny
-Whether to deny access to the entity
-
getDenyReason
Gets the reason the stargate access was denied- Returns:
The reason the stargate access was denied
-
setDenyReason
Sets the reason the stargate access was deniedSet to null for a generic message. Set to empty for no message.
- Parameters:
denyReason
-The new reason why the stargate access was denied
-