Interface IMenu

All Superinterfaces:
ISendable<IMenu>
All Known Implementing Classes:
Menu

public interface IMenu extends ISendable<IMenu>
Represents a menu.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    close(@NotNull Canvas ctx, @NotNull org.bukkit.entity.Player player)
    Called when the menu is closed.
    void
    open(@NotNull Canvas ctx, @NotNull org.bukkit.entity.Player player)
    Called when the menu is opened.
    default void
    preClose(@NotNull Canvas ctx, @NotNull org.bukkit.entity.Player player)
    Called right before the canvas data is erased.
    default void
    update(@NotNull Canvas ctx, @NotNull org.bukkit.entity.Player player)
    Called when the menu is updated.

    Methods inherited from interface com.marcusslover.plus.lib.common.ISendable

    send, send, send, send, sendAll, sendAll, sendAll
  • Method Details

    • open

      void open(@NotNull @NotNull Canvas ctx, @NotNull @NotNull org.bukkit.entity.Player player)
      Called when the menu is opened.
      Parameters:
      ctx - the canvas
      player - the player
    • preClose

      default void preClose(@NotNull @NotNull Canvas ctx, @NotNull @NotNull org.bukkit.entity.Player player)
      Called right before the canvas data is erased. You may use the menuUpdateContext here.
      Parameters:
      ctx - the canvas
      player - the player
    • close

      default void close(@NotNull @NotNull Canvas ctx, @NotNull @NotNull org.bukkit.entity.Player player)
      Called when the menu is closed. At this point using menuUpdateContext is not possible.
      Parameters:
      ctx - the canvas
      player - the player
    • update

      default void update(@NotNull @NotNull Canvas ctx, @NotNull @NotNull org.bukkit.entity.Player player)
      Called when the menu is updated.
      Parameters:
      ctx - the canvas
      player - the player