kris123345

MAKE MA AN PLUGIN THAT ALLOW ADMIN TO ADD ANY EFFECTS TO THE ITEMS AND YOU CAN WEAR ARMOR WITH EFFECTS AND YOU WILL GET THATS AND ENCHANTING ANYTHING TO EVEN 255 LEVEL

Kodari AI
KodariMay 11 at 12:11 pm 22,392 (v2)
ItemEffectsEnchanter
A powerful admin utility plugin that allows adding custom potion effects and unlimited enchantments to any item. Admins can attach potion effects directly to armor and items — wearing enchanted armor automatically applies those effects to the player. Supports enchantment levels up to 255 on any item. Includes intuitive commands to add/remove/list effects and enchantments, with persistent data storage so items retain their properties across restarts.

Planning class dependencies:

  • ItemEffectsEnchanter (main plugin) — registers commands, listeners, managers

  • EffectManager — handles NBT-based effect/enchant data on items

  • ArmorListener — detects equip/unequip events, applies/removes potion effects

  • EffectCommand — /itemeffect command (add/remove/list effects)

  • EnchantCommand — /itemenchant command (add/remove/list enchants)

  • NBTUtil — reads/writes custom NBT data to items

  • config.yml, plugin.yml

Now I have everything I need. Let me build the full plugin:

Now I need to fix the ArmorListener constructor call in the main class since I added a plugin parameter:Let me create all the remaining files properly:

Now fix the main class to pass plugin to ArmorListener:

It seems the system is not generating the file contents. Let me create all files explicitly:

Here’s a summary of everything generated:


Files Created

File
Purpose
ItemEffectsEnchanter.java
Main plugin class — registers commands, listeners, managers
NBTUtil.java
Reads/writes custom potion effect data to item NBT via
PersistentDataContainer
EffectManager.java
Applies/removes armor effects on players, tracks active effects per player
ArmorListener.java
Listens for equip/unequip events and refreshes armor effects accordingly
EffectCommand.java
/itemeffect add/remove/list/clear
— manage effects on held item
EnchantCommand.java
/itemenchant add/remove/list/clear
— manage enchants (levels 1–255) on held item
plugin.yml
Commands, permissions (default: op)
config.yml
Placeholder config
build.gradle
Build config

Usage

  • /itemeffect add SPEED 1 60 — adds Speed II for 60 seconds to held item; equip as armor to receive the effect

  • /itemenchant add SHARPNESS 255 — adds Sharpness 255 to held item

  • Effects persist on the item via NBT — they survive server restarts and inventory transfers

kris123345

and make it i can edit texture of that item and menu to this plugin and i want more features

Kodari AI
KodariMay 11 at 12:17 pm 38,700 (v2)

Let me read all existing files first before making any changes.

Good, I have a full picture of the codebase. Here’s my plan:

  • GUI system — full inventory GUI with main menu, effects editor, enchants editor, item editor (rename, lore, custom model data / texture, glow toggle)

  • New features — item rename, lore editor, custom model data (texture), glow toggle, item give command, permanent effects (infinite duration), effect preview

  • New command — /itemedit opens the GUI; /itemgive gives a custom item to a player

  • Refactor — wire GUIManager + GUIListener into main class, add all new commands to plugin.yml

Let me build everything:

Now update the EffectManager to handle permanent effects (duration = -1):Now let me write all the files properly:

Now create all the GUI implementations:

Now update the main class to wire everything together and add the new /itemedit and /itemgive commands:

Now update plugin.yml and config.yml:


Here’s everything that was added/changed:

New Files

File
Purpose
inventory/InventoryHandler.java
Interface for GUI event callbacks
inventory/InventoryButton.java
Clickable slot with icon + click handler
inventory/InventoryGUI.java
Abstract base for all GUI screens
inventory/gui/GUIManager.java
Tracks open GUIs, routes events
inventory/gui/GUIListener.java
Bukkit listener wired to GUIManager
util/ItemBuilder.java
Fluent builder for creating ItemStacks
managers/ChatInputManager.java
Intercepts chat for text input prompts
inventory/impl/MainMenuGUI.java
Hub menu — 4 category buttons + item preview
inventory/impl/EffectsGUI.java
View/add/remove potion effects via GUI
inventory/impl/EnchantGUI.java
View/add/remove enchantments via GUI
inventory/impl/ItemEditorGUI.java
Rename, set lore, toggle glow
inventory/impl/TextureGUI.java
Set/remove custom model data
commands/ItemEditCommand.java
/itemedit
— opens the GUI
commands/ItemGiveCommand.java
/itemgive <player> <material> [amount]

New Features Summary

  • /itemedit — opens a full GUI editor for the item in your hand

  • Effects GUI — lists all effects, right-click to remove, button to add via chat, clear all

  • Enchants GUI — same pattern for enchantments up to 255

  • Item Editor GUI — rename with & color codes, set multi-line lore with | separator, toggle glow

  • Texture GUI — set/remove custom model data for resource pack texture overrides

  • /itemgive — give any material to any online player with tab-complete

  • Permanent effects — use duration -1 for infinite armor effects

kris123345

and make all the features in 1 INVENTORY GUI and name that Kirih

Kodari AI
KodariMay 11 at 12:21 pm 41,782 (v2)

Let me read all the existing files first.

Now I have a full picture. Here’s my plan:

  • Delete all 5 separate GUI impl files — replace with one single KirihGUI.java that has all sections (Effects, Enchants, Item Editor, Texture) in one 54-slot inventory with a tab/page system

  • Update ItemEditCommand to open KirihGUI instead of MainMenuGUI

  • Delete MainMenuGUI, EffectsGUI, EnchantGUI, ItemEditorGUI, TextureGUI

  • Keep all other files untouched

Now create the single unified KirihGUI:

Now update ItemEditCommand to open KirihGUI instead of the deleted MainMenuGUI:

Now write the full KirihGUI:

All five separate GUI files are deleted and replaced with a single KirihGUI.java. Here’s what changed:

What was done

Deleted — MainMenuGUI, EffectsGUI, EnchantGUI, ItemEditorGUI, TextureGUI (5 files gone)

Created — KirihGUI.java — one 54-slot inventory named ✦ Kirih with:

Row
Purpose
Row 0 (slots 0–8)
Tab bar
— Effects · Enchants · Item Editor · Texture / Model Data · Item preview
Rows 1–4 (slots 9–44)
Content area
— lists effects/enchants or info cards depending on active tab
Row 5 (slots 45–53)
Action bar
— Add, Set Lore, Clear Lore, Glow toggle, Clear All, Close
  • Clicking a tab header switches in-place (same inventory name, new content)

  • Active tab header shows in bright color + bold; inactive tabs are gray

  • All features work exactly as before — add/remove effects, add/remove enchants up to 255, rename, set lore with | separator, toggle glow, set/remove custom model data

  • /itemedit now opens KirihGUI directly on the Effects tab

kris123345

and that must be in the command /kirih

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
19 1,756
src/main/java/com/itemeffects/ItemEffectsEnchanter.java
package com.itemeffects;

import com.itemeffects.commands.EffectCommand;
import com.itemeffects.commands.EnchantCommand;
import com.itemeffects.commands.ItemEditCommand;
import com.itemeffects.commands.ItemGiveCommand;
import com.itemeffects.inventory.gui.GUIListener;
import com.itemeffects.inventory.gui.GUIManager;
import com.itemeffects.listeners.ArmorListener;
import com.itemeffects.managers.ChatInputManager;
import com.itemeffects.managers.EffectManager;
import org.bukkit.plugin.java.JavaPlugin;

public class ItemEffectsEnchanter extends JavaPlugin {

    private EffectManager effectManager;
    private GUIManager guiManager;
    private ChatInputManager chatInputManager;

    @Override
    public void onEnable() {
        this.effectManager = new EffectManager(this);
        this.guiManager = new GUIManager();
        this.chatInputManager = new ChatInputManager(this);

        getServer().getPluginManager().registerEvents(new ArmorListener(effectManager, this), this);
        getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
        getServer().getPluginManager().registerEvents(chatInputManager, this);

        getCommand("itemeffect").setExecutor(new EffectCommand(effectManager));
        getCommand("itemenchant").setExecutor(new EnchantCommand());
        getCommand("itemedit").setExecutor(new ItemEditCommand(this));
        getCommand("itemgive").setExecutor(new ItemGiveCommand(this));

        getLogger().info("ItemEffectsEnchanter enabled.");
    }

    @Override
    public void onDisable() {
        getLogger().info("ItemEffectsEnchanter disabled.");
    }

    public EffectManager getEffectManager() {
        return effectManager;
    }

    public GUIManager getGuiManager() {
        return guiManager;
    }

    public ChatInputManager getChatInputManager() {
        return chatInputManager;
    }
}