Class NextPageAction
java.lang.Object
io.github.toberocat.toberocore.action.Action
io.github.toberocat.guiengine.action.NextPageAction
public class NextPageAction
extends io.github.toberocat.toberocore.action.Action
The `NextPageAction` class represents an action that allows a player to navigate to the next page of a
`PagedComponent`.
This class is licensed under the GNU General Public License.
- Since:
- 30.04.2023
- Author:
- Tobias Madlberger (Tobias)
-
Constructor Summary
ConstructorsConstructorDescriptionNextPageAction
(@NotNull PagedComponent pagedComponent) Constructs a new `NextPageAction` with the specified `PagedComponent`. -
Method Summary
Modifier and TypeMethodDescription@NotNull String
label()
Returns the label of this action, which is based on the ID of the associated `PagedComponent` and the action type ("next").void
run
(@NotNull org.bukkit.entity.Player player) Performs the action of navigating to the next page of the associated `PagedComponent` for the specified player.Methods inherited from class io.github.toberocat.toberocore.action.Action
register, run, run, run, run, run, run, run, run
-
Constructor Details
-
NextPageAction
Constructs a new `NextPageAction` with the specified `PagedComponent`.- Parameters:
pagedComponent
- The `PagedComponent` for which this action is associated.
-
-
Method Details
-
label
Returns the label of this action, which is based on the ID of the associated `PagedComponent` and the action type ("next").- Specified by:
label
in classio.github.toberocat.toberocore.action.Action
- Returns:
- The label of this action.
-
run
public void run(@NotNull @NotNull org.bukkit.entity.Player player) Performs the action of navigating to the next page of the associated `PagedComponent` for the specified player.- Overrides:
run
in classio.github.toberocat.toberocore.action.Action
- Parameters:
player
- The player who triggered the action.
-