MenuEngine 1.4.7

An engine that makes menu creation and maintenance very simple.

  1. Vilsol
    Contributors:
    Vilsol
    MenuEngine
    GitHub Repo

    Hello everyone! I am finally writing this up, even though my library has been out for a while, I have been debugging it intensively, and it seems to be at a perfectly working state.

    What is MenuEngine?
    MenuEngine is a library, that makes it extremely easy to create custom menu's, including very simple ones, to complex and dynamic ones.

    Why MenuEngine?
    I have used many menu libraries before, but there always have been certain problems with them, where I wouldn't be able to use them for very complex inventories, or they would lag intensively, or even worse: break and not work at all. I have created MenuEngine, in the hope of fixing all of the above.

    Usage:

    For Server Owners

    Download latest version from Here and put it in your plugins folder.

    For Developers:

    Yes, it doesn't require a repository, it is in the central Maven repository.
    Code (Text):
    <dependency>
        <groupId>me.vilsol</groupId>
        <artifactId>menuengine</artifactId>
        <version>1.4.7</version>
    </dependency>
    Example:
    This example will create a menu, with an item that looks like an arrow, and once it left/right clicked, it will send a message to the player who clicked it and with which button.

    TestPlugin.class
    It is required that every object is initialized at least once.​
    Code (Text):
    public class TestPlugin extends JavaPlugin {
        public void onEnable(){
            // Register Items
            new ExampleItem().registerItem();
            // Register Menus
            new MainMenu();
        }
    }
    MainMenu.class
    In the simple MenuModel, you can simply add items in the constructor, by only passing the class of the item, and the slot you want the place the item in.​
    Code (Text):
    public class MainMenu extends MenuModel {
        public MainMenu() {
            super(9, "Main Menu");
            getMenu().addItem(ExampleItem.class, 0);
        }
    }
    ExampleItem.class
    Every menu item has to have its own class. Each item must have a registerItem() method, which will register the item in the MenuEngine.​
    Code (Text):
    public class ExampleItem implements MenuItem {
        @Override
        public void registerItem() {
            MenuItem.items.put(this.getClass(), this);
        }

        @Override
        public void execute(Player plr, ClickType click) {
            plr.closeInventory();
            if(click == ClickType.LEFT){
                plr.sendMessage("You Left Clicked!");
            }else if(click == ClickType.RIGHT){
                plr.sendMessage("You Right Clicked!");
            }
        }

        @Override
        public ItemStack getItem() {
            return new Builder(Material.ARROW).name("Example Item").item();
        }
    }

Recent Updates

  1. Internal Updates

Recent Reviews

  1. unenergizer
    unenergizer
    5/5,
    Version: 1.4.7
    Great menu builder! I have used this extensively with my plugins. Thank you for this easy to use resource! :)