Interface GuiViewManager

All Known Implementing Classes:
DefaultGuiViewManager

public interface GuiViewManager
An interface representing a manager for GUI views in a Minecraft plugin.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable GuiView
    getGuiView(@NotNull UUID player)
    Get the GUI view associated with the given player UUID.
    default @Nullable GuiView
    getGuiView(@NotNull org.bukkit.entity.Player player)
    Get the GUI view associated with the given Bukkit Player object.
    boolean
    isViewingGui(@NotNull UUID player)
    Check if the given player is currently viewing a GUI.
    default boolean
    isViewingGui(@NotNull org.bukkit.entity.Player player)
    Check if the given Bukkit Player object is currently viewing a GUI.
    void
    registerGui(@NotNull UUID player, @NotNull GuiView guiView)
    Register a new GUI view for the given player.
  • Method Details

    • getGuiView

      @Nullable @Nullable GuiView getGuiView(@NotNull @NotNull UUID player)
      Get the GUI view associated with the given player UUID.
      Parameters:
      player - The UUID of the player.
      Returns:
      The GuiView associated with the player, or null if not found.
    • isViewingGui

      boolean isViewingGui(@NotNull @NotNull UUID player)
      Check if the given player is currently viewing a GUI.
      Parameters:
      player - The UUID of the player.
      Returns:
      true if the player is viewing a GUI, false otherwise.
    • registerGui

      void registerGui(@NotNull @NotNull UUID player, @NotNull @NotNull GuiView guiView)
      Register a new GUI view for the given player.
      Parameters:
      player - The UUID of the player.
      guiView - The GuiView to be registered.
    • getGuiView

      @Nullable default @Nullable GuiView getGuiView(@NotNull @NotNull org.bukkit.entity.Player player)
      Get the GUI view associated with the given Bukkit Player object. This is a default method that delegates to the UUID-based version of getGuiView.
      Parameters:
      player - The Bukkit Player object.
      Returns:
      The GuiView associated with the player, or null if not found.
    • isViewingGui

      default boolean isViewingGui(@NotNull @NotNull org.bukkit.entity.Player player)
      Check if the given Bukkit Player object is currently viewing a GUI. This is a default method that delegates to the UUID-based version of isViewingGui.
      Parameters:
      player - The Bukkit Player object.
      Returns:
      true if the player is viewing a GUI, false otherwise.