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

    Constructors
    Constructor
    Description
    NextPageAction(@NotNull PagedComponent pagedComponent)
    Constructs a new `NextPageAction` with the specified `PagedComponent`.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NextPageAction

      public NextPageAction(@NotNull @NotNull PagedComponent pagedComponent)
      Constructs a new `NextPageAction` with the specified `PagedComponent`.
      Parameters:
      pagedComponent - The `PagedComponent` for which this action is associated.
  • Method Details

    • label

      @NotNull public @NotNull String 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 class io.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 class io.github.toberocat.toberocore.action.Action
      Parameters:
      player - The player who triggered the action.