java.lang.Object
io.github.somesourcecode.someguiapi.scene.gui.Gui
io.github.somesourcecode.someguiapi.scene.gui.ChestGui
All Implemented Interfaces:
org.bukkit.inventory.InventoryHolder

public class ChestGui extends Gui implements org.bukkit.inventory.InventoryHolder
Represents a GUI that can be shown to players.
  • Field Summary

    Fields inherited from class io.github.somesourcecode.someguiapi.scene.gui.Gui

    inventory
  • Constructor Summary

    Constructors
    Constructor
    Description
    ChestGui(net.kyori.adventure.text.Component title, int rows)
    Constructs a new ChestGui with the specified title and number of rows.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull org.bukkit.inventory.Inventory
     
    int
    Returns the number of rows of this GUI.
    Returns the Scene of this GUI.
    net.kyori.adventure.text.Component
    Returns the title of this GUI.
    List<org.bukkit.entity.Player>
    Returns a list of players that are currently viewing this GUI.
    void
    setRows(int rows)
    Sets the number of rows of this GUI.
    void
    setScene(Scene scene)
    Sets the Scene of this GUI.
    void
    setTitle(net.kyori.adventure.text.Component title)
    Sets the title of this GUI.
    void
    show(org.bukkit.entity.Player player)
    Shows this GUI to the specified player.

    Methods inherited from class io.github.somesourcecode.someguiapi.scene.gui.Gui

    update

    Methods inherited from class java.lang.Object

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

    • ChestGui

      public ChestGui(net.kyori.adventure.text.Component title, int rows)
      Constructs a new ChestGui with the specified title and number of rows.
      Parameters:
      title - the title
      rows - the number of rows
  • Method Details

    • show

      public void show(org.bukkit.entity.Player player)
      Description copied from class: Gui
      Shows this GUI to the specified player.
      Specified by:
      show in class Gui
      Parameters:
      player - the player
    • getScene

      public Scene getScene()
      Returns the Scene of this GUI.
      Returns:
      the scene
    • setScene

      public void setScene(Scene scene)
      Sets the Scene of this GUI.
      Parameters:
      scene - the scene
    • getTitle

      public net.kyori.adventure.text.Component getTitle()
      Returns the title of this GUI.
      Returns:
      the title
    • setTitle

      public void setTitle(net.kyori.adventure.text.Component title)
      Sets the title of this GUI.
      Parameters:
      title - the title
    • getRows

      public int getRows()
      Returns the number of rows of this GUI.
      Returns:
      the number of rows
    • setRows

      public void setRows(int rows)
      Sets the number of rows of this GUI.
      Parameters:
      rows - the number of rows
    • getInventory

      @NotNull public @NotNull org.bukkit.inventory.Inventory getInventory()
      Specified by:
      getInventory in interface org.bukkit.inventory.InventoryHolder
    • getViewers

      public List<org.bukkit.entity.Player> getViewers()
      Description copied from class: Gui
      Returns a list of players that are currently viewing this GUI.
      Specified by:
      getViewers in class Gui
      Returns:
      a list of players viewing this GUI