Package eu.xap3y.xagui
Class XaGui
Object
XaGui
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddOpenMenu(UUID uuid, GuiMenuInterface menu) voidcloseAll()Close all open menusvoidRegister an open menucreateMenu(String name, int rows) Create a new menucreateMenu(String name, int rows, int pages) Create a new menuGet all open menusstatic voidremoveOpenMenu(UUID uuid) voidsetBorderItem(ItemStack item) Set the item that will be used to fill the menu bordervoidsetButtonClickSound(Sound sound, float volume) Set the sound that will be played when a player clicks a buttonvoidsetClickSound(Sound sound) Set the sound that will be played when a player clicks a buttonvoidsetCloseButton(GuiButton item) Set the item that will be used as the close buttonvoidsetCloseButtonSound(Sound sound) Set the sound that will be played when a player closes a menuvoidsetNextPageButton(ItemStack item) Set the item that will be used in paginator as next page buttonvoidsetOnClose(GuiCloseInterface closeAction) Set a handler invoked when any xagui inventory is closed.voidsetOnOpen(GuiOpenInterface openAction) Set a handler invoked when any xagui inventory is opened.voidsetPreviousPageButton(ItemStack item) Set the item that will be used in paginator as previous page buttonvoidsetRedirectSound(Sound sound) Set the sound that will be played when a player is redirected to another menu
-
Constructor Details
-
XaGui
public XaGui(@NotNull @NotNull JavaPlugin plugin)
-
-
Method Details
-
createMenu
-
createMenu
-
closeMenu
-
closeAll
public void closeAll()Close all open menus -
setBorderItem
public void setBorderItem(ItemStack item) Set the item that will be used to fill the menu border- Parameters:
item- The item that will fill the border
-
setOnClose
Set a handler invoked when any xagui inventory is closed.- Parameters:
closeAction- close handler
-
setOnOpen
Set a handler invoked when any xagui inventory is opened.- Parameters:
openAction- open handler
-
getOpenMenus
Get all open menus- Returns:
- A map of all open menus
-
setCloseButton
Set the item that will be used as the close button- Parameters:
item- The item that will be used as the close button
-
setNextPageButton
public void setNextPageButton(ItemStack item) Set the item that will be used in paginator as next page button- Parameters:
item- the item to use as next page button
-
setPreviousPageButton
public void setPreviousPageButton(ItemStack item) Set the item that will be used in paginator as previous page button- Parameters:
item- the item to use as previous page button
-
setRedirectSound
public void setRedirectSound(Sound sound) Set the sound that will be played when a player is redirected to another menu- Parameters:
sound- The sound that will be played
-
setCloseButtonSound
public void setCloseButtonSound(Sound sound) Set the sound that will be played when a player closes a menu- Parameters:
sound- The sound that will be played
-
setButtonClickSound
public void setButtonClickSound(Sound sound, float volume) Set the sound that will be played when a player clicks a button- Parameters:
sound- The sound that will be played
-
setClickSound
public void setClickSound(Sound sound) Set the sound that will be played when a player clicks a button- Parameters:
sound- The sound that will be played
-
addOpenMenu
-
removeOpenMenu
-