java.lang.Object
io.github.somesourcecode.someguiapi.scene.gui.Gui
Direct Known Subclasses:
ChestGui

public abstract class Gui extends Object
The base class for GUIs that can be shown to players.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.bukkit.inventory.Inventory
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Gui()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract List<org.bukkit.entity.Player>
    Returns a list of players that are currently viewing this GUI.
    abstract void
    show(org.bukkit.entity.Player player)
    Shows this GUI to the specified player.
    void
    Updates the GUI for all viewers.

    Methods inherited from class java.lang.Object

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

    • inventory

      protected org.bukkit.inventory.Inventory inventory
  • Constructor Details

    • Gui

      public Gui()
  • Method Details

    • show

      public abstract void show(org.bukkit.entity.Player player)
      Shows this GUI to the specified player.
      Parameters:
      player - the player
    • getViewers

      public abstract List<org.bukkit.entity.Player> getViewers()
      Returns a list of players that are currently viewing this GUI.
      Returns:
      a list of players viewing this GUI
    • update

      public void update()
      Updates the GUI for all viewers.