Build the requested Paper Minecraft plugin for Paper 1.21.4. User requirements: commands /egui, /enchants, and /enchantgui should open the same enchant GUI; include a help command and a plugin reload command; add custom enchantment(s) or enchanted books with custom enchantment(s) of your choice; provide at least one custom enchant for each weapon. Implement as a complete, usable plugin, with plugin metadata/commands/permissions/config as appropriate. Be careful about Paper 1.21.4 APIs and Java version used by this project. Interpret weapon coverage to include all Minecraft weapon types available in 1.21.4 (sword, axe, bow, crossbow, trident, and mace), with at least one custom enchant usable for each. Prefer a GUI that lets a player select/apply custom enchanted books, with validation, costs or clear documented behavior, and persistence/recognition of custom enchantments on items. Include /enchanthelp (and optionally /egui help) plus /enchantreload or a documented reload subcommand for configuration. Ensure all aliases work. Include clear default config and README/usage documentation. Make changes only; do not attempt to build or report build status.

Kodari AI
KodariSep 30 at 8:19 am 1
EnchantForgeGUI
EnchantForgeGUI is a Paper 1.21.4 Minecraft plugin that provides an interactive inventory-based GUI for applying custom enchantments to weapons. Players use /egui, /enchants, or /enchantgui to open the same enchantment selection interface, where they can browse and apply custom enchanted books to swords, axes, bows, crossbows, tridents, and maces. The plugin includes unique custom enchantments per weapon type, such as FlameFury for swords, TitanStrike for axes, and PiercingVolley for bows. It features a help command (/enchanthelp) and a configuration reload command (/enchantreload) for runtime updates. The GUI validates item compatibility, enforces cost rules, and persists custom enchantments on items. Configuration is stored in a YAML file with sensible defaults, and comprehensive README documentation covers setup, commands, permissions, and enchantment details.
  1. Create the Paper 1.21.4 Gradle project, metadata, permissions, and configurable messages.

  2. Add a GUI that gives custom enchanted books, plus anvil validation and persisted custom-enchant data.

  3. Implement effects for sword, axe, bow, crossbow, trident, and mace; document usage and costs.

Created the Paper 1.21.4 EnchantGUI plugin with /egui, /enchants, and /enchantgui, plus help and reload commands.

The GUI gives free custom enchanted books for swords, axes, bows, crossbows, tridents, and maces. Books apply to matching weapons in an anvil at zero levels; custom enchantments are stored on the items. Added configurable messages, permissions, and usage documentation.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
11 572
src/main/java/com/kodari/enchantgui/EnchantGuiPlugin.java
package com.kodari.enchantgui;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Objects;

public final class EnchantGuiPlugin extends JavaPlugin {
    private CustomEnchantService enchantService;
    private EnchantMenu enchantMenu;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        enchantService = new CustomEnchantService(this);
        enchantMenu = new EnchantMenu(this, enchantService);

        Bukkit.getPluginManager().registerEvents(enchantMenu, this);
        Bukkit.getPluginManager().registerEvents(new CustomEnchantListener(this, enchantService), this);

        EnchantCommand command = new EnchantCommand(this, enchantMenu);
        registerCommand("egui", command);
        registerCommand("enchanthelp", command);
        registerCommand("enchantreload", command);
    }

    private void registerCommand(String name, EnchantCommand executor) {
        PluginCommand command = Objects.requireNonNull(getCommand(name), "Missing command in plugin.yml: " + name);
        command.setExecutor(executor);
    }

    public String color(String text) {
        return ChatColor.translateAlternateColorCodes('&', text);
    }

    public void sendMessage(org.bukkit.command.CommandSender sender, String path) {
        sender.sendMessage(color(getConfig().getString(path, "&cMissing message: " + path)));
    }
}