IcyTruyxz Young

Create a minecraft 26.2 plugin for papermc that allows people with the luck perms rank booster, mod, admin, owner to open an ender chest, anvil, and crafting gui with a simple comand in the chat

Kodari AI
KodariSep 3 at 4:10 pm 1
StaffUtilityGUI
A PaperMC plugin providing staff members with quick access to essential utilities through simple chat commands. Players with luckperms ranks booster, mod, admin, or owner can open an ender chest, anvil, or crafting table GUI using /ec, /anvil, and /craft commands. The plugin validates player permissions before opening each GUI, ensuring only authorized staff can access these features. Uses a custom inventory GUI framework with button-based interaction, lazy initialization, and centralized event management for efficient handling of inventory clicks, opens, and closes. Commands are registered with proper permission checks and feedback messages for unauthorized users.
  1. Create the Gradle Paper 1.21.4/26.2 plugin structure and metadata.

  2. Add LuckPerms group-based access checks for booster, mod, admin, and owner.

  3. Register simple /enderchest, /anvil, and /crafting commands with aliases and GUI opening logic.

Created the Paper 26.2 plugin with LuckPerms rank-based access.

  • Allowed groups: booster, mod, admin, owner

  • Commands:

    • /enderchest or /ec

    • /anvil or /av

    • /crafting, /craft, or /workbench

  • Non-player senders are rejected.

  • LuckPerms is declared as a required plugin dependency.

  • GUI access is checked against inherited LuckPerms groups.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
6 155
src/main/java/com/kodari/rankuigui/RankGuiAccessPlugin.java
package com.kodari.rankuigui;

import java.util.Objects;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class RankGuiAccessPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        RankAccess rankAccess = new RankAccess();

        registerCommand("anvil", new UtilityGuiCommand(rankAccess, UtilityGuiCommand.GuiType.ANVIL));
        registerCommand("crafting", new UtilityGuiCommand(rankAccess, UtilityGuiCommand.GuiType.CRAFTING));

        getLogger().info("RankGuiAccess enabled for LuckPerms groups: booster, mod, admin, owner.");
    }

    private void registerCommand(String name, UtilityGuiCommand executor) {
        PluginCommand command = Objects.requireNonNull(getCommand(name), "Command is missing from plugin.yml: " + name);
        command.setExecutor(executor);
    }
}