Class GUI
- java.lang.Object
-
- net.frozenspace.frostlib.gui.design.GUI
-
- Direct Known Subclasses:
PersonalGUI,SharedGUI
public abstract class GUI extends java.lang.ObjectThis class is the representation of a GUI
-
-
Constructor Summary
Constructors Constructor Description GUI(@NotNull java.lang.String name, @NotNull org.bukkit.plugin.Plugin plugin)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull PagecreatePage(@NotNull java.lang.String name, @NotNull Size size)Create a page and add it to page listbooleanequals(java.lang.Object obj)Determine if an object is equals to this object@NotNull java.lang.StringgetName()Get the name of the GUI@Nullable PagegetPage(@NotNull java.lang.String name)Get the selected page using namejava.util.Set<Page>getPages()Get the pages of the GUIprotected @NotNull PagenextPage(@NotNull Page currentPage, @NotNull org.bukkit.entity.Player player)Show the next page according to the current pageprotected @NotNull PageopenGUI(@NotNull org.bukkit.entity.Player player)Open the GUI to the selected player (first page)protected @NotNull PageshowPage(@NotNull Page page, @NotNull org.bukkit.entity.Player player)Show the selected page to the selected player
-
-
-
Method Detail
-
getPage
@Nullable public @Nullable Page getPage(@NotNull @NotNull java.lang.String name)
Get the selected page using name- Parameters:
name- Name of the page- Returns:
- The page found or null
-
createPage
@NotNull public @NotNull Page createPage(@NotNull @NotNull java.lang.String name, @NotNull @NotNull Size size)
Create a page and add it to page list- Parameters:
name- Name of the pagesize- Size of the page- Returns:
- The page created
-
openGUI
@NotNull protected @NotNull Page openGUI(@NotNull @NotNull org.bukkit.entity.Player player)
Open the GUI to the selected player (first page)- Parameters:
player- Player wanted- Returns:
- The page opened
-
showPage
@NotNull protected @NotNull Page showPage(@NotNull @NotNull Page page, @NotNull @NotNull org.bukkit.entity.Player player)
Show the selected page to the selected player- Parameters:
page- Page to showplayer- Player wanted- Returns:
- The page show
-
nextPage
@NotNull protected @NotNull Page nextPage(@NotNull @NotNull Page currentPage, @NotNull @NotNull org.bukkit.entity.Player player)
Show the next page according to the current page- Parameters:
currentPage- The current pageplayer- The player wanted- Returns:
- The page next page or the current if there is no next page
-
getName
@NotNull public @NotNull java.lang.String getName()
Get the name of the GUI- Returns:
- Name of the GUI
-
getPages
public java.util.Set<Page> getPages()
Get the pages of the GUI- Returns:
- Pages of the GUI
-
equals
public boolean equals(java.lang.Object obj)
Determine if an object is equals to this object- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- The object to check- Returns:
- true if equals false if not
-
-