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 -
Method Summary
Methods inherited from class io.github.toberocat.toberocore.action.Action
register, run, run, run, run, run, run, run, run
-
Constructor Details
-
OpenGuiAction
public OpenGuiAction()
-
-
Method Details
-
label
Returns the label of this action, which is "open".- 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, @NotNull @NotNull String @NotNull [] args) Performs the action of opening a GUI for the specified player using the `GuiEngineApi`.- Overrides:
run
in classio.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.
-