Class GUIOpenEvent
java.lang.Object
me.remigio07.chatplugin.api.server.event.gui.GUIEvent
me.remigio07.chatplugin.api.server.event.gui.GUIOpenEvent
- All Implemented Interfaces:
CancellableEvent,ChatPluginEvent,ChatPluginPlayerEvent,ChatPluginServerPlayerEvent
Represents an event called just before a
GUI is opened to a player.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGUIOpenEvent(GUI gui, ChatPluginServerPlayer player, int page, boolean openActions) Constructs a new GUI open event. -
Method Summary
Modifier and TypeMethodDescriptionintgetPage()Gets the page opened to the player.Gets the player involved with this event.booleanChecks if this event has been cancelled and will not be executed.booleanChecks if open actions have been performed while opening.voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.remigio07.chatplugin.api.common.event.ChatPluginEvent
call
-
Constructor Details
-
GUIOpenEvent
Constructs a new GUI open event.- Parameters:
gui- GUI involvedplayer- Player involvedpage- Page involvedopenActions- Whether open actions have been performed
-
-
Method Details
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableEventChecks if this event has been cancelled and will not be executed.- Specified by:
isCancelledin interfaceCancellableEvent- Returns:
- Whether this event is cancelled
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:CancellableEventSets the cancellation state of this event.It will be passed through other registered listeners even if it is cancelled, but it will not be executed.
- Specified by:
setCancelledin interfaceCancellableEvent- Parameters:
cancelled- Whether this event should be cancelled
-
getPlayer
Description copied from interface:ChatPluginServerPlayerEventGets the player involved with this event.- Specified by:
getPlayerin interfaceChatPluginPlayerEvent- Specified by:
getPlayerin interfaceChatPluginServerPlayerEvent- Returns:
- Player involved
-
getPage
public int getPage()Gets the page opened to the player.Will return 0 for
.SinglePageGUIs- Returns:
- GUI's page
-
isOpenActions
public boolean isOpenActions()Checks if open actions have been performed while opening.- Returns:
- Whether open actions have been performed
-