Interface MachineMenus


public interface MachineMenus
Opens machine menus (ยง23.3). Implemented by a menu-plugin integration (zMenu); current() is empty without one, and machines then have no GUI.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable MachineMenus
    The menus of the running server, or null (no menu plugin).
    boolean
    open(@NotNull org.bukkit.entity.Player player, @NotNull WorldPosition position)
    Opens the menu configured for the type of the machine at position.
    boolean
    open(@NotNull org.bukkit.entity.Player player, @NotNull WorldPosition position, @NotNull String menu)
    Opens the menu file menu (e.g.
    static void
    setCurrent(@Nullable MachineMenus menus)
    Set by the menu integration when it starts and stops.
  • Method Details

    • open

      boolean open(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull WorldPosition position)
      Opens the menu configured for the type of the machine at position. Player's thread.
      Returns:
      whether a menu was opened
    • open

      boolean open(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull WorldPosition position, @NotNull @NotNull String menu)
      Opens the menu file menu (e.g. a side configuration menu) for the machine at position.
    • current

      @Nullable static @Nullable MachineMenus current()
      The menus of the running server, or null (no menu plugin).
    • setCurrent

      @Internal static void setCurrent(@Nullable @Nullable MachineMenus menus)
      Set by the menu integration when it starts and stops.