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 TypeMethodDescriptionbooleangetDeny()Gets whether the entity should be denied accessGets the reason the stargate access was deniedvoidsetDeny(boolean deny) Sets whether to deny access to the entityvoidsetDenyReason(String denyReason) Sets the reason the stargate access was deniedMethods inherited from class org.sgrewritten.stargate.api.event.portal.StargateEntityPortalEvent
getEntityMethods inherited from class org.sgrewritten.stargate.api.event.portal.StargatePortalEvent
getPortalMethods 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
-