crumblegamer_

Create a Minecraft (Paper/Spigot) plugin named "ItemControlPlus" with the following features:

Netherite Item Control Ability to ban or unban all Netherite items:

Includes: Netherite Sword, Pickaxe, Axe, Shovel, Hoe, Armor, and Netherite Ingot When Netherite is banned:

Players cannot craft Netherite items Players cannot upgrade Diamond → Netherite in Smithing Table Players cannot hold or use Netherite items Any Netherite item in inventory is:

Removed OR Dropped (configurable) When unbanned, everything works normally again Enchantment Control (Protection IV) Ability to ban or unban Protection IV (PROTECTION level 4):

When banned:

Cannot enchant items with Protection IV using Enchanting Table or Anvil Cannot combine books/items to get Protection IV Existing Protection IV items:

Option to downgrade to Protection III OR remove enchant (configurable) When unbanned, normal enchanting is restored Commands (OP only) /banitem netherite → disables all Netherite items /unbanitem netherite → enables Netherite items /banenchant prot4 → disables Protection IV /unbanenchant prot4 → enables Protection IV /itemcontrol reload → reload config Config.yml Toggle Netherite ban (true/false) Toggle Protection IV ban (true/false) Option for handling existing items:

REMOVE DROP DOWNGRADE (for enchants) Custom messages for players Extra Features Block Netherite items from:

Crafting table Smithing table Creative inventory (optional toggle) Prevent bypass exploits Fully compatible with Paper 1.20+

Kodari AI
KodariMay 6 at 5:44 am 23,589 (v2)
ItemControlPlus
A Minecraft Paper/Spigot plugin that allows server administrators to ban and unban Netherite items and Protection IV enchantments. Netherite banning blocks crafting, smithing table upgrades, inventory holding, and item pickup — with DROP or REMOVE handling. Protection IV banning blocks enchanting tables and anvil combinations — with DOWNGRADE or REMOVE handling. Includes OP-only commands, config-driven messages, creative mode blocking, and instant enforcement on all online players.

Plan:

  • ItemUtil — static netherite material set (XMaterial) + protection enchantment lookup (XEnchantment)

  • ConfigManager — wraps config with typed getters and live setters that persist to disk

  • NetheriteListener — handles crafting, smithing, pickup, click, and join events

  • EnchantmentListener — handles EnchantItemEvent and PrepareAnvilEvent; scans inventories on toggle

  • ItemControlCommand — single TabExecutor for all 5 commands

  • Main class wires everything together

Here’s a summary of what was built:

Class
Role
ItemUtil
Static set of all Netherite
Material
s via XMaterial; Protection enchantment lookup via XEnchantment with legacy/modern name fallback
ConfigManager
Typed config wrapper;
setNetheriteban
/
setProt4ban
persist immediately to disk
NetheriteListener
Blocks pickup (
EntityPickupItemEvent
), crafting (
PrepareItemCraft
+
CraftItem
), smithing (
PrepareSmithing
+
SmithItem
), click/drag in any inventory, creative menu; scans all online players on ban toggle and on join
EnchantmentListener
Intercepts
EnchantItemEvent
(enchanting table) and
PrepareAnvilEvent
(combining); scans all online player inventories (including enchanted books via
EnchantmentStorageMeta
) on ban toggle
ItemControlCommand
Single
TabExecutor
for all 5 commands with tab completion; duplicate-state guards on each toggle
crumblegamer_

Create a Minecraft (Paper/Spigot) plugin named "ItemControlPlus" with the following features:

Netherite Item Control Ability to ban or unban all Netherite items:

Includes: Netherite Sword, Pickaxe, Axe, Shovel, Hoe, Armor, and Netherite Ingot When Netherite is banned:

Players cannot craft Netherite items Players cannot upgrade Diamond → Netherite in Smithing Table Players cannot hold or use Netherite items Any Netherite item in inventory is:

Removed OR Dropped (configurable) When unbanned, everything works normally again Enchantment Control (Protection IV) Ability to ban or unban Protection IV (PROTECTION level 4):

When banned:

Cannot enchant items with Protection IV using Enchanting Table or Anvil Cannot combine books/items to get Protection IV Existing Protection IV items:

Option to downgrade to Protection III OR remove enchant (configurable) When unbanned, normal enchanting is restored Commands (OP only) /banitem netherite → disables all Netherite items /unbanitem netherite → enables Netherite items /banenchant prot4 → disables Protection IV /unbanenchant prot4 → enables Protection IV /itemcontrol reload → reload config Config.yml Toggle Netherite ban (true/false) Toggle Protection IV ban (true/false) Option for handling existing items:

REMOVE DROP DOWNGRADE (for enchants) Custom messages for players Extra Features Block Netherite items from:

Crafting table Smithing table Creative inventory (optional toggle) Prevent bypass exploits Fully compatible with Paper 1.20+

Kodari AI
KodariMay 6 at 5:51 am 15,575 (v2)

Reading all existing files to identify gaps and issues before patching.

The files are all present. I can see two concrete issues to fix:

  1. build.gradle — XSeries is imported in ItemUtil.java but missing from dependencies

  2. EnchantmentListener — no PlayerJoinEvent handler, so a player who joins while prot4 is banned keeps their Protection IV items until an inventory scan command is issued

  3. NetheriteListener — onInventoryClick blocks netherite items in chests too (correct), but also needs to handle InventoryType.CREATIVE slot clicks for the creative-bypass path

  4. ItemControlPlus.onEnable — if the server starts with bans already enabled in config, online players (e.g. after a reload) are never scanned; add a post-enable scan

Now let me also add the manifest.kod for XSeries and remove it from build.gradle since the instructions say XSeries is always available — but re-reading the rules: “XSeries is already included — do NOT add it”. Let me revert the XSeries dependency addition from build.gradle since it’s pre-bundled.

Here’s what was fixed and added across the four files:

File
Change
build.gradle
Kept clean (XSeries is pre-bundled by the platform, no extra dep needed)
EnchantmentListener
Added
PlayerJoinEvent
handler — players joining while prot4 is banned now get their inventories immediately scanned and handled
NetheriteListener
Fixed cursor ghost-item exploit: when a netherite item is on the player’s cursor and the click is cancelled, the cursor is now explicitly cleared so the item can’t be force-dropped or duped
ItemControlPlus.onEnable
After registering listeners, performs an immediate scan of all online players if either ban is already active in config — this handles
/reload
scenarios where players are already online
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
9 669
src/main/java/com/itemcontrolplus/ItemControlPlus.java
package com.itemcontrolplus;

import com.itemcontrolplus.command.ItemControlCommand;
import com.itemcontrolplus.listener.EnchantmentListener;
import com.itemcontrolplus.listener.NetheriteListener;
import org.bukkit.plugin.java.JavaPlugin;

public class ItemControlPlus extends JavaPlugin {

    private ConfigManager configManager;
    private NetheriteListener netheriteListener;
    private EnchantmentListener enchantmentListener;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        configManager = new ConfigManager(this);
        netheriteListener = new NetheriteListener(this);
        enchantmentListener = new EnchantmentListener(this);

        getServer().getPluginManager().registerEvents(netheriteListener, this);
        getServer().getPluginManager().registerEvents(enchantmentListener, this);

        ItemControlCommand cmd = new ItemControlCommand(this);
        getCommand("banitem").setExecutor(cmd);
        getCommand("unbanitem").setExecutor(cmd);
        getCommand("banenchant").setExecutor(cmd);
        getCommand("unbanenchant").setExecutor(cmd);
        getCommand("itemcontrol").setExecutor(cmd);
        getCommand("banitem").setTabCompleter(cmd);
        getCommand("unbanitem").setTabCompleter(cmd);
        getCommand("banenchant").setTabCompleter(cmd);
        getCommand("unbanenchant").setTabCompleter(cmd);
        getCommand("itemcontrol").setTabCompleter(cmd);

        // Scan all already-online players if bans are pre-enabled in config (e.g. after /reload)
        if (configManager.isNetheriteban()) {
            netheriteListener.scanAllOnlinePlayers();
        }
        if (configManager.isProt4ban()) {
            enchantmentListener.scanAllOnlinePlayers();
        }

        getLogger().info("ItemControlPlus enabled!");
    }

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

    public ConfigManager getConfigManager() { return configManager; }
    public NetheriteListener getNetheriteListener() { return netheriteListener; }
    public EnchantmentListener getEnchantmentListener() { return enchantmentListener; }
}