XaGui Docs
Intro

Quick start

1. Create an instance of the XaGUI library in onEnable() method of your plugin

Java code
@Override
public void onEnable() {
    XaGUI xaGUI = new XaGUI(this);
}
Kotlin code
override fun onEnable() {
    val xaGUI = XaGUI(this)
}

2. Creating a single page GUI with 6 rows

Java code
GuiMenu gui = xaGui.createMenu("&7GUI TITLE", 6);
 
gui.fillBorder();
 
gui.addCloseButton();
 
gui.setOnOpen((event) -> {
    player.sendMessage("You opened the GUI!");
    return null;
});
 
gui.open(player);
Kotlin code
val gui = xaGui.createMenu("&7GUI TITLE", 6)
gui.fillBorder()
 
gui.addCloseButton();
 
gui.setOnOpen {
    it.player.sendMessage("Gui opened")
}
 
gui.open(player)
 

This is the result:


For bigger example, you can visit this project

Rest of the documentation will be in Java, hope that you can convert it to Kotlin easily.

On this page