Class AsyncPlayerToggleCheckboxEvent
java.lang.Object
org.bukkit.event.Event
xyz.gmitch215.socketmc.events.SocketEvent
xyz.gmitch215.socketmc.events.screen.AsyncPlayerScreenEvent
xyz.gmitch215.socketmc.events.screen.AsyncPlayerElementEvent
xyz.gmitch215.socketmc.events.screen.AsyncPlayerClickButtonEvent
xyz.gmitch215.socketmc.events.screen.AsyncPlayerToggleCheckboxEvent
Represents an event that is called when a player toggles a checkbox on a screen.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
Constructor Summary
ConstructorDescriptionAsyncPlayerToggleCheckboxEvent
(@NotNull CheckboxButton element, boolean checked, @NotNull AbstractScreen screen, @NotNull SocketPlayer player) Creates a new AsyncPlayerToggleCheckboxEvent instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the checkbox that was toggled.boolean
Gets the new state of the checkbox.Methods inherited from class xyz.gmitch215.socketmc.events.screen.AsyncPlayerScreenEvent
getScreen
Methods inherited from class xyz.gmitch215.socketmc.events.SocketEvent
getHandlerList, getHandlers, getPlayer, getSocketPlayer, toString
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
AsyncPlayerToggleCheckboxEvent
public AsyncPlayerToggleCheckboxEvent(@NotNull @NotNull CheckboxButton element, boolean checked, @NotNull @NotNull AbstractScreen screen, @NotNull @NotNull SocketPlayer player) Creates a new AsyncPlayerToggleCheckboxEvent instance.- Parameters:
element
- The element associated with this eventchecked
- The new state of the checkboxscreen
- The screen associated with this eventplayer
- The player associated with this event
-
-
Method Details
-
getElement
Gets the checkbox that was toggled.- Overrides:
getElement
in classAsyncPlayerClickButtonEvent
- Returns:
- The checkbox that was toggled
-
isChecked
public boolean isChecked()Gets the new state of the checkbox.- Returns:
- The new state of the checkbox
-