Class OpenGuiAction

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

public class OpenGuiAction extends io.github.toberocat.toberocore.action.Action
The `OpenGuiAction` class represents an action that allows a player to open a GUI using the `GuiEngineApi`.

This class is licensed under the GNU General Public License.

Since:
29.04.2023
Author:
Tobias Madlberger (Tobias)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Returns the label of this action, which is "open".
    void
    run(@NotNull org.bukkit.entity.Player player, @NotNull String @NotNull [] args)
    Performs the action of opening a GUI for the specified player using the `GuiEngineApi`.

    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

    • OpenGuiAction

      public OpenGuiAction()
  • Method Details

    • label

      @NotNull public @NotNull String label()
      Returns the label of this action, which is "open".
      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, @NotNull @NotNull String @NotNull [] args)
      Performs the action of opening a GUI for the specified player using the `GuiEngineApi`.
      Overrides:
      run in class io.github.toberocat.toberocore.action.Action
      Parameters:
      player - The player who triggered the action.
      args - The arguments passed to the action. The first argument is expected to be the API ID, and the second argument is the GUI ID.