Open a menu

Because you know how to create a menu, let's open it !

To open a menu it's really simple !

If you have followed all others tutorials, you will be find this really simple.

Let's imagine you have to call a function that get as argument your player to open your menu. You juste have to write this code:

//do not forget to create a variable for your plugin class
MyPlugin plugin;

public void openMyMenu(Player player) {
    plugin.getGuiManager().openMenu(player, "MyMenu");
}

Last updated