GUIs API
The EdToolsGuisAPI
allows you to manage and display custom graphical user interfaces (GUIs) to players.
Get API Instance
EdToolsGuisAPI guisAPI = EdToolsAPI.getInstance().getGuisAPI();
Methods
openGui(Player player, String gui)
openGui(Player player, String gui)
Opens a specified GUI for a player.
player
: The player to whom the GUI will be shown.gui
: The ID of the GUI (the name of its.yml
file).
openGui(Player player, String gui, Map<String, String> placeholders)
openGui(Player player, String gui, Map<String, String> placeholders)
Opens a GUI for a player and applies a map of placeholders to its contents.
player
: The player.gui
: The GUI ID.placeholders
: AMap
where keys are placeholder names (without{}
) and values are what they should be replaced with.
closeGui(Player player)
closeGui(Player player)
Closes the currently opened custom GUI for a player.
player
: The player whose inventory will be closed.
loadGui(String guiId, File guiFile)
loadGui(String guiId, File guiFile)
Loads a new GUI into the system at runtime from a file.
guiId
: The unique ID for this new GUI.guiFile
: The.yml
file containing the GUI's configuration.
Was this helpful?