HKMCCustomEnchants – Advanced Custom Enchantment Plugin
Develop a complete, production-ready Minecraft Java plugin named HKMCCustomEnchants for my HKMC Minecraft server.
- Server Requirements
- Server software: Paper
- Minecraft version: 26.2
- Java version: 25
- Plugin language: Java
- Build system: Gradle
- Plugin must support Java and Bedrock players (Geyser/Floodgate).
- Must work alongside other popular plugins such as EssentialsX, LuckPerms, Vault, BetterTeams, and GrimAC.
- Custom Enchantment System
Create a custom enchantment system that supports extremely high enchantment levels.
Examples:
- Sharpness I–2000
- Protection I–2000
- Unbreaking I–2000
- Efficiency I–2000
- Fire Aspect I–2000
- Knockback I–2000
- Power I–2000
- Fortune I–2000
- Looting I–2000
- Thorns I–2000
- Feather Falling I–2000
- Projectile Protection I–2000
- Blast Protection I–2000
- Fire Protection I–2000
- Sweeping Edge I–2000
Allow administrators to configure the maximum level of each enchantment independently.
- Enchantment Mechanics
Custom enchantments must have actual gameplay effects.
Examples:
Sharpness
- Increases melee attack damage.
- Higher levels deal more damage.
- Must support levels up to 2000.
Protection
- Reduces incoming damage.
- Higher levels provide stronger protection.
- Must have configurable damage reduction limits.
Efficiency
- Increases mining speed.
- Must support extremely high levels without breaking blocks incorrectly.
Unbreaking
- Reduces durability consumption.
- Must work with all compatible equipment.
Fire Aspect
- Increases fire damage duration.
- Configurable maximum duration.
Fortune
- Increases compatible block drops.
- Must include configurable drop multipliers and anti-exploit limits.
Looting
- Increases mob drops.
- Configurable maximum drop multiplier.
All enchantments must have configurable mechanics and reasonable performance limits.
- Commands
Main command: "/ce"
- "/ce help" – Display all commands.
- "/ce give <player> <enchantment> <level>" – Give a custom enchanted book.
- "/ce enchant <enchantment> <level>" – Enchant the item in your hand.
- "/ce remove <enchantment>" – Remove an enchantment from the held item.
- "/ce clear" – Remove all custom enchantments from the held item.
- "/ce info" – Display enchantments on the held item.
- "/ce list" – Display all available enchantments.
- "/ce maxlevel <enchantment> <level>" – Change maximum enchantment level.
- "/ce reload" – Reload configuration.
- "/ce version" – Display plugin version.
- Enchantment Books
- Custom enchanted books must have unique names and descriptions.
- Display enchantment names and levels using Roman numerals when possible.
- Books must be obtainable through administrator commands.
- Administrators can configure whether custom books can be used in anvils.
- Prevent unauthorized duplication and exploitation.
- Enchanted books must retain their custom enchantment data after restarting the server.
- GUI System
Create an interactive enchantment GUI.
Command: "/ce gui"
GUI features:
- Display all custom enchantments.
- Show enchantment descriptions.
- Show maximum levels.
- Allow players to view their enchanted equipment.
- Optional player enchantment purchase system using Vault economy.
- Administrators can manage enchantments through a separate GUI.
- Permissions
- "hkmc.enchants.use"
- "hkmc.enchants.gui"
- "hkmc.enchants.admin"
- "hkmc.enchants.give"
- "hkmc.enchants.enchant"
- "hkmc.enchants.remove"
- "hkmc.enchants.reload"
- "hkmc.enchants.maxlevel"
Default permissions must be configured securely.
- Configuration
Create a fully customizable config.yml.
Administrators must be able to configure:
- Maximum level for every enchantment.
- Damage multipliers.
- Damage reduction.
- Mining speed multipliers.
- Drop multipliers.
- Fire duration.
- Enchantment compatibility.
- Anvil support.
- GUI settings.
- Messages.
- Permission requirements.
- Performance and anti-exploit limits.
- Important Technical Requirements
- Do not rely on vanilla enchantment level limits.
- Store custom enchantment levels using PersistentDataContainer or another reliable persistent storage mechanism.
- Implement custom enchantment effects through appropriate Paper events and APIs.
- Handle extremely high levels safely.
- Avoid integer overflow and excessive calculations.
- Prevent item duplication exploits.
- Prevent conflicts with other plugins.
- Ensure custom enchantments work after server restarts.
- Do not use unsafe NBT manipulation.
- Do not crash when players use enchanted items in anvils, grindstones, crafting tables, or inventories.
- Make the plugin compatible with Java and Bedrock clients.
- Deliverables
Generate the entire project, including:
- Complete Java source code.
- Main plugin class.
- Custom enchantment manager.
- Enchantment effect handlers.
- Command system.
- GUI system.
- Permission management.
- config.yml.
- plugin.yml.
- Gradle build files.
- README with installation instructions.
Provide exact step-by-step instructions to build the plugin and install the resulting JAR on my Paper 26.2 server.
IMPORTANT: Do not provide incomplete code, pseudocode, or placeholder methods. Generate a fully working plugin with all source files. Verify API compatibility with Paper 26.2 and Java 25. Build and test the complete project before declaring it finished.