public InventoryMenu(String title, int size) {
        this.id = IDGenerator.nextId();
        DSHPlugin.getPluginInstance().getServer().getPluginManager().registerEvents(this, DSHPlugin.getPluginInstance());

        if (size < 0) {
            size = 9;
        } else if (size % 9 != 0) {
            size += 9 - (size % 9);
        }
        this.title = title;
        this.size = size;
    }