Class OpenMenuAction

java.lang.Object
io.github.lucfr1746.llibrary.action.Action
io.github.lucfr1746.llibrary.action.list.OpenMenuAction

public class OpenMenuAction extends Action
Represents an action that opens a custom GUI menu for a player. This action uses the InventoryManager to open a menu based on its ID.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs an OpenMenuAction with the specified menu ID.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(org.bukkit.entity.Player player)
    Executes the action by opening the menu associated with the given ID for the specified player.

    Methods inherited from class java.lang.Object

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

    • OpenMenuAction

      public OpenMenuAction(String menuID)
      Constructs an OpenMenuAction with the specified menu ID.
      Parameters:
      menuID - The ID of the menu to open.
  • Method Details

    • execute

      public void execute(org.bukkit.entity.Player player)
      Executes the action by opening the menu associated with the given ID for the specified player.
      Specified by:
      execute in class Action
      Parameters:
      player - The player who will see the opened menu.