Class PreviousPageAction

java.lang.Object
io.github.toberocat.toberocore.action.Action
io.github.toberocat.guiengine.action.PreviousPageAction

public class PreviousPageAction extends io.github.toberocat.toberocore.action.Action
The `PreviousPageAction` class represents an action that allows a player to navigate to the previous 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
    PreviousPageAction(@NotNull PagedComponent pagedComponent)
    Constructs a new `PreviousPageAction` 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 ("previous").
    void
    run(@NotNull org.bukkit.entity.Player player)
    Performs the action of navigating to the previous 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

    • PreviousPageAction

      public PreviousPageAction(@NotNull @NotNull PagedComponent pagedComponent)
      Constructs a new `PreviousPageAction` 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 ("previous").
      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 previous 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.