1qqmss

Make a plugin that adds a protection 5 upgrade. Make it an red dye named "protection 5 upgrade" make it a drag and drop features only apply able to armors. When right clicked to the armor it should enchant it with protection 5

Kodari AI
KodariApr 24 at 3:12 am 5,498 (v2)

I’ll create a plugin that adds a Protection 5 upgrade item with drag-and-drop functionality.

Protection5Upgrade
A plugin that adds Protection 5 upgrade items. Players can apply Protection 5 enchantment to armor pieces by dragging and dropping a special red dye item onto armor in their inventory. The upgrade item is consumed upon use and only works on helmets, chestplates, leggings, and boots. Includes an admin command to give the upgrade item to players.

Done! I’ve created a Protection 5 Upgrade plugin with the following features:

Core Features:

  • Red dye item named “Protection 5 Upgrade” with custom lore

  • Drag-and-drop mechanic: click the upgrade item onto any armor piece in your inventory

  • Only works on helmets, chestplates, leggings, and boots

  • Applies Protection V enchantment (works even beyond vanilla limits)

  • Prevents upgrading armor that already has Protection V or higher

  • Consumes one upgrade item per use

  • Plays level-up sound on successful upgrade

Command:

  • /giveupgrade <player> [amount] - Gives the upgrade item to players (requires protection5upgrade.give permission)

The plugin uses XSeries for cross-version compatibility and will work across Minecraft versions.

1qqmss

make another one but make it protection 6-8 and also make the "red dye" enchanted with unbreaking 10 and has a informative lore.

Kodari AI
KodariApr 24 at 3:22 am 9,688 (v2)

I’ll read the existing files first to understand the structure, then add Protection 6-8 upgrades with enchanted glow and informative lore.

Now I’ll update the plugin to support Protection 5-8 with enchanted glow and informative lore.

Done! I’ve updated the plugin to support Protection 5-8 upgrades with the following new features:

Enhanced Upgrade Items:

  • All items are red dye with enchanted glow (Unbreaking 10 + HIDE_ENCHANTS flag)

  • Informative bordered lore showing:

    • What enchantment level it applies (with Roman numerals)

    • Step-by-step usage instructions

    • Warnings about armor-only use and consumption

  • Visual appeal with color-coded information

Updated Command:

  • /giveupgrade <player> <level> [amount] - Now requires specifying level 5, 6, 7, or 8

  • Example: /giveupgrade Steve 8 5 gives 5 Protection VIII upgrades to Steve

Protection Levels:

  • Protection V, VI, VII, and VIII all available

  • Prevents upgrading if armor already has that level or higher

  • Each upgrade item applies its specific protection level

The items now have a professional look with the enchanted glow effect and comprehensive lore explaining their purpose and usage!

1qqmss

Make the protection 5 item a green dye and make the protection 6 item a yellow dye and make the protection 7 item a gray dye and make the protection 8 item a red dye and also make the plugin configurable.

Kodari AI
KodariApr 24 at 3:55 am 16,255 (v2)

I’ll read the current files, then add different dye colors for each level and make the plugin configurable.

Now I’ll add different dye colors for each level and make everything configurable.

Done! I’ve made the plugin fully configurable with different dye colors for each protection level:

Dye Colors:

  • Protection 5: Green Dye

  • Protection 6: Yellow Dye

  • Protection 7: Gray Dye

  • Protection 8: Red Dye

Configuration Features:

  • Customizable material, name, and lore for each protection level

  • Configurable enchanted glow effect (enabled by default with Unbreaking 10)

  • All messages are configurable with placeholder support

  • Sound settings (type, volume, pitch) are configurable

  • Easy to add more protection levels by adding new sections in config.yml

The plugin now reads from config.yml for all item properties, messages, and sounds, making it fully customizable without code changes!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 501
src/main/java/com/protectionupgrade/Protection5Upgrade.java
package com.protectionupgrade;

import com.protectionupgrade.commands.GiveUpgradeCommand;
import com.protectionupgrade.listeners.UpgradeListener;
import org.bukkit.plugin.java.JavaPlugin;

public class Protection5Upgrade extends JavaPlugin {

    private static Protection5Upgrade instance;

    @Override
    public void onEnable() {
        instance = this;
        
        saveDefaultConfig();
        
        getServer().getPluginManager().registerEvents(new UpgradeListener(this), this);
        getCommand("giveupgrade").setExecutor(new GiveUpgradeCommand(this));
        getLogger().info("Protection Upgrade plugin enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("Protection Upgrade plugin disabled!");
    }
    
    public static Protection5Upgrade getInstance() {
        return instance;
    }
}