mohib-7428

A plugin that removes the vanilla max 255 enchant limit and pushes it to the 32 bit integer limit (if possible else smaller)

Kodari AI
KodariAug 16 at 6:02 pm 1
EnchantLimitBreaker
A Minecraft plugin that removes the vanilla 255 enchantment level cap, allowing enchantments to reach the 32-bit integer maximum (2,147,483,647) when possible. The plugin intercepts enchantment application events, overrides the vanilla level restrictions, and provides configuration options for custom maximum levels per enchantment type. It includes commands to set custom enchantment levels on items, a permission system for admin control, and automatic handling of level display formatting. The plugin ensures compatibility with anvils, enchanting tables, and command-based enchantment application while maintaining server stability through configurable safety limits.
  1. Create the Gradle plugin project and Bukkit metadata.

  2. Add an unsafe-enchantment service targeting Integer.MAX_VALUE with graceful fallback.

  3. Add player commands for setting, maxing, removing, clearing, and inspecting enchantments.

  4. Extend anvil merging so equal enchantments can exceed level 255.

Created the UnlimitedEnchants plugin from scratch.

  • Supports enchantment levels up to Integer.MAX_VALUE (2,147,483,647).

  • Falls back to the highest level accepted by the server if necessary.

  • Adds /ue set, /ue max, /ue remove, /ue clear, and /ue info.

  • Allows anvil combinations to exceed level 255.

  • Includes tab completion, permissions, Gradle setup, and plugin metadata.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
7 396
src/main/java/com/kodari/unlimitedenchants/UnlimitedEnchantsPlugin.java
package com.kodari.unlimitedenchants;

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

public final class UnlimitedEnchantsPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        EnchantmentService enchantmentService = new EnchantmentService();
        UnlimitedEnchantsCommand command = new UnlimitedEnchantsCommand(enchantmentService);
        PluginCommand pluginCommand = getCommand("unlimitedenchants");
        if (pluginCommand != null) {
            pluginCommand.setExecutor(command);
            pluginCommand.setTabCompleter(command);
        }
        getServer().getPluginManager().registerEvents(new AnvilListener(enchantmentService), this);
    }
}