π
pasted-code-1786483935823.txt
txt
793 lines
βΆ
Absolutely β hereβs a polished prompt you can paste into another AI/code generator. Iβve added the important edge cases and configuration options so the plugin idea is much more complete.
Minecraft 1.21.11 Netherite Manager Plugin β Full Development Prompt
Create a production-ready Java plugin for Minecraft Java Edition 1.21.11 using Paper, with full Geyser/Bedrock compatibility.
The plugin should be called Netherite Manager and provide server administrators with a INVENTORY GUI that allows them to control which Netherite-related items and mechanics are enabled or disabled on the server.
The plugin should be designed to work correctly for both Java and Bedrock players through Geyser, and the INVENTORY GUI should be usable by administrators regardless of whether they are connecting from Java or Bedrock.
1. Main Netherite Manager INVENTORY GUI
Create an administrator INVENTORY GUI opened with:
/netheritemanager
Only OP players should be able to use this command.
Also add permission support:
netheritemanager.admin
The command should check both the permission and OP status, so normal players cannot access the manager.
The INVENTORY GUI should be clearly organised and easy to understand.
INVENTORY GUI layout
The top/main section should contain:
Netherite Helmet
Netherite Chestplate
Netherite Leggings
Netherite Boots
Netherite Sword
Netherite Pickaxe
Netherite Axe
Netherite Shovel
Netherite Hoe
These should be represented by their actual Minecraft items.
Each item should visually indicate whether it is:
π’ Enabled
or
π΄ Disabled
For example:
Green dye/glass pane = enabled
Red dye/glass pane = disabled
Clicking a Netherite item should toggle that specific item on/off.
2. Netherite Armour Conversion
When a Netherite armour piece is disabled, the plugin must automatically prevent players from using that Netherite item.
If a player is currently wearing a disabled Netherite armour piece, convert it back into the corresponding Diamond armour piece.
Examples:
Netherite Helmet β Diamond Helmet
Netherite Chestplate β Diamond Chestplate
Netherite Leggings β Diamond Leggings
Netherite Boots β Diamond Boots
The conversion must preserve:
All enchantments
Enchantment levels
Item name
Lore
Item flags
Custom model data
Any compatible custom item metadata
Armour trims
Other relevant PersistentDataContainer data where appropriate
Important trim behaviour
If a Netherite armour piece has an armour trim, the trim must remain on the converted Diamond armour.
Example:
Netherite Helmet + Sentry Trim β Diamond Helmet + Sentry Trim
Do NOT simply create a brand-new Diamond item and lose the player's customisation.
3. Netherite Tools and Weapons
The same system should work for Netherite tools and weapons.
Allow administrators to individually enable/disable:
Netherite Sword
Netherite Pickaxe
Netherite Axe
Netherite Shovel
Netherite Hoe
If one is disabled, convert existing Netherite versions into their Diamond equivalent.
Examples:
Netherite Sword β Diamond Sword
Netherite Pickaxe β Diamond Pickaxe
Netherite Axe β Diamond Axe
Netherite Shovel β Diamond Shovel
Netherite Hoe β Diamond Hoe
Preserve all applicable:
Enchantments
Names
Lore
Item flags
Custom data
Other metadata
4. Netherite Armour Trim Management
Add a separate configuration option for Netherite armour trims.
The administrator should be able to choose whether Netherite armour trims are:
Enabled
Disabled
If disabled, Netherite armour should not be able to use armour trims.
Ideally, provide more granular control if practical, allowing administrators to manage:
All Netherite trims
Individual trim patterns
Individual trim materials
Make sure disabling Netherite itself and disabling Netherite trims are treated as separate settings.
5. Ancient Debris
Add a configuration option for:
Ancient Debris
Allow admins to enable/disable:
Ancient Debris
If disabled:
Players should not be able to obtain Ancient Debris through normal gameplay.
Existing Ancient Debris should be handled according to a configurable policy.
Provide a setting for what happens to existing Ancient Debris:
Keep existing items
Delete existing items
Convert to another item
Prevent pickup
The safest default should be prevent obtaining new Ancient Debris without automatically destroying existing items.
Handle:
Block breaking
Silk Touch
Explosions
Hoppers
Chests
Loot
Furnaces/smelting where applicable
Item pickups
6. Netherite Upgrade Template
Add management for the Netherite Upgrade Smithing Template.
Allow admins to enable/disable obtaining and using the template.
If disabled, prevent players from:
Picking up the template
Crafting/duplicating the template where applicable
Obtaining it through supported loot sources
Using it to upgrade Diamond equipment into Netherite
Existing templates should have configurable behaviour.
7. Netherite Scrap
Add a separate toggle for:
Netherite Scrap
Allow admins to enable/disable:
Netherite Scrap
Handle:
Obtaining it
Smelting Ancient Debris
Existing items
Picking it up
Crafting with it
8. Netherite Ingot
Add a separate toggle for:
Netherite Ingots
Allow admins to enable/disable Netherite Ingots.
If disabled:
Prevent crafting them
Prevent obtaining them through supported gameplay
Prevent pickup if configured
Prevent using them in relevant crafting/smithing mechanics
Existing Netherite Ingots should have a configurable policy.
9. Netherite Smithing
Add a dedicated setting:
Netherite Smithing
Allow admins to enable/disable the ability to upgrade Diamond equipment into Netherite.
When disabled, prevent Netherite upgrades through:
Smithing Tables
Any supported vanilla smithing mechanics
This should be separate from simply disabling Netherite items.
For example, an admin may want:
Netherite equipment already owned = allowed
Creating new Netherite equipment = disabled
Support this kind of configuration.
10. Netherite Crafting
Add a setting for Netherite-related crafting.
Allow admins to control whether players can craft:
Netherite Ingots
Netherite-related items
Any relevant Netherite recipes
Use proper Bukkit/Paper recipe events where appropriate.
11. Netherite Item Pickup
Add a global setting:
Prevent Netherite Pickup
When enabled, players cannot pick up disabled Netherite-related items.
Handle dropped items for:
Armour
Tools
Weapons
Netherite Ingots
Netherite Scrap
Ancient Debris
Netherite Upgrade Templates
Do not allow players to bypass this simply by using hoppers or other inventory mechanics.
12. Existing Items
This is extremely important.
The plugin must correctly handle Netherite items that already exist before an administrator disables them.
Create a configurable Existing Item Policy.
Possible options:
CONVERT
Automatically convert disabled Netherite equipment to Diamond.
KEEP
Allow existing items to remain, but prevent creation of new ones.
DELETE
Remove disabled items.
BLOCK_USE
Keep the item but prevent players from using/equipping it.
The admin should be able to select the preferred behaviour.
The default for Netherite armour/tools should be:
CONVERT
13. Player Inventories
When a Netherite item is disabled, the plugin should check player inventories.
It should be able to find disabled Netherite items in:
Main inventory
Armour slots
Offhand
Potentially other supported player inventory locations
If the selected policy is CONVERT, convert them while preserving their metadata.
Be careful not to duplicate items or accidentally delete items during conversion.
14. Containers and Storage
Consider Netherite items stored inside:
Chests
Barrels
Shulker Boxes
Ender Chests
Hoppers
Droppers
Dispensers
Furnaces
Other inventories supported by Bukkit/Paper
The plugin should have a configurable option for whether existing disabled items inside containers are:
Left alone
Converted
Deleted
Do not perform expensive scans of every loaded container every tick.
Use event-based handling and safe/admin-triggered cleanup where possible.
15. Netherite Usage Restrictions
If a Netherite item is disabled, prevent players from bypassing the system by:
Equipping it
Using it
Moving it into armour slots
Putting it into their offhand
Using it in crafting
Using it in smithing
Using it through hoppers
Dropping and picking it back up
Using it through inventories
Obtaining it through commands if practical
Listen to the appropriate Paper/Bukkit events for inventory movement, crafting, smithing, item pickup, block breaking, entity drops, etc.
Do not unnecessarily block legitimate admin actions.
16. Creative Mode
Add a setting:
Manage Creative Mode
Options:
Block disabled Netherite items in Creative
Allow Creative players to use disabled items
OP bypass
By default, OP/admin players should be able to bypass restrictions if configured.
17. OP/Admin Bypass
Add a configuration option:
admin-bypass: true
When enabled, players with:
netheritemanager.admin
can use disabled Netherite items.
This should make testing and administration easier.
However, the INVENTORY GUI itself must still only be accessible to authorised administrators.
18. INVENTORY GUI Bottom Configuration Bar
The bottom row of the INVENTORY GUI should contain configuration buttons.
For example:
β General Settings
π‘ Armour Settings
β Tools & Weapons
β¨ Trim Settings
β Ancient Debris
π Upgrade Template
π¨ Smithing Settings
π¦ Existing Item Policy
π Reload/Refresh
πΎ Save Settings
Use intuitive Minecraft INVENTORY GUI items and colours.
The INVENTORY GUI should have multiple pages/submenus if there are too many settings to fit on one screen.
19. Status Display
The INVENTORY GUI should clearly show the current status.
For example:
Netherite Helmet
STATUS: ENABLED
or
STATUS: DISABLED
Include a short description explaining what clicking the item will do.
Example:
Netherite Helmet
Status: DISABLED
Click to enable
Use colour coding consistently.
20. Confirmation Screens
For potentially destructive actions such as:
Delete existing items
Convert all existing Netherite
Reset configuration
show a confirmation screen:
Are you sure?
β
Confirm
β Cancel
This prevents accidental server-wide changes.
21. Configuration File
Create a clean config.yml.
It should contain settings for every major feature.
Example structure:
netherite:
armor:
helmet: true
chestplate: true
leggings: true
boots: true
tools:
sword: true
pickaxe: true
axe: true
shovel: true
hoe: true
trims:
enabled: true
ancient-debris:
enabled: true
netherite-scrap:
enabled: true
netherite-ingot:
enabled: true
upgrade-template:
enabled: true
smithing:
enabled: true
crafting:
enabled: true
pickup:
enabled: true
existing-items:
policy: CONVERT
admin-bypass: true
Design the configuration however you think is best, as long as it is easy for server owners to understand.
22. Commands
Implement:
/netheritemanager
Open the main INVENTORY GUI.
/netheritemanager reload
Reload the configuration.
/netheritemanager status
Display the current Netherite settings.
/netheritemanager help
Display available commands.
All administrative commands must require:
netheritemanager.admin
and/or OP as appropriate.
Add tab completion.
23. Messages
Create a configurable messages file:
messages.yml
Allow server owners to customise messages such as:
No permission
INVENTORY GUI opened
Netherite item disabled
Netherite item enabled
Item converted
Configuration reloaded
Invalid command
Confirmation messages
Support colour codes and preferably MiniMessage/Adventure components if appropriate for Paper 1.21.11.
24. Logging
Add optional logging.
When an administrator changes a Netherite setting, log something similar to:
[NetheriteManager] Admin disabled Netherite Chestplates.
For mass conversions:
[NetheriteManager] Converted 37 Netherite Chestplates into Diamond Chestplates.
Allow logging to be enabled/disabled in the configuration.
25. Persistence
INVENTORY GUI changes must immediately save to config.yml or a dedicated data file.
The settings must survive:
Server restart
Plugin reload
/reload where possible
Do not rely only on in-memory variables.
26. Geyser / Bedrock Compatibility
The plugin must work correctly with:
Geyser
and Floodgate if installed.
Do NOT make the plugin dependent on Geyser unless absolutely necessary.
The core functionality should work through standard Bukkit/Paper APIs so both Java and Bedrock players are supported.
The INVENTORY GUI should avoid Java-only INVENTORY GUI assumptions that would make it unusable for Bedrock players through Geyser.
If there are known Geyser limitations with certain inventory INVENTORY GUI mechanics, design around them.
27. Performance
The plugin must be lightweight and production-ready.
Do NOT:
Scan every player every tick
Scan every world every tick
Constantly scan every chest
Run expensive synchronous operations repeatedly
Create unnecessary tasks
Use event-driven handling wherever possible.
If a server-wide conversion is required, perform it safely and efficiently, preferably with appropriate batching/asynchronous processing where Paper API rules allow it.
Never access Bukkit/Paper world or inventory APIs asynchronously when doing so is unsafe.
28. Edge Cases
Handle as many edge cases as reasonably possible, including:
Player logs in while wearing disabled Netherite
Player dies while carrying disabled Netherite
Netherite equipment is inside a shulker box
Netherite equipment is moved between inventories
Netherite equipment is dropped
Netherite equipment is picked up
Netherite equipment is equipped through an inventory
Netherite equipment is obtained from loot
Netherite equipment is created through smithing
Netherite equipment is created through commands
Players attempting to bypass restrictions
Creative mode
Hoppers
Dispensers
Droppers
Villager/trading-related interactions where applicable
Plugin reloads
Server restarts
Multiple players changing inventories simultaneously
Items with unusual/custom enchantments
Items with trims
Items with custom names/lore
Items with PersistentDataContainer data
Do not cause duplication or item loss.
29. Safety / Conversion Rules
When converting:
Netherite β Diamond
copy the item's relevant metadata rather than simply replacing the item.
For example:
Netherite Pickaxe
Efficiency V
Unbreaking III
Fortune III
Custom Name
Lore
Item Flags
Custom Data
should become:
Diamond Pickaxe
Efficiency V
Unbreaking III
Fortune III
Custom Name
Lore
Item Flags
Custom Data
Do not copy Netherite-specific attributes that are invalid for Diamond items.
Handle Minecraft's item data correctly using the Paper/Bukkit API for 1.21.11.
30. Modern Minecraft API
Target Minecraft Java 1.21.11 specifically.
Use a modern Paper API rather than old/deprecated APIs where possible.
Use:
Java 21 or the Java version officially required by the selected Paper 1.21.11 build
Paper API
Adventure/MiniMessage where appropriate
PersistentDataContainer where appropriate
Do not use NMS unless absolutely necessary.
If NMS is required for a specific feature, isolate it and explain why.
31. Project Structure
Create a complete buildable project.
Prefer:
NetheriteManager/
βββ src/
β βββ main/
β βββ java/
β β βββ ...
β βββ resources/
β βββ plugin.yml
β βββ config.yml
β βββ messages.yml
βββ pom.xml
βββ README.md
Use Maven unless there is a strong reason to use Gradle.
Organise the Java code into logical classes, such as:
Main plugin class
Command handler
INVENTORY GUI manager
INVENTORY GUI pages
Configuration manager
Netherite manager
Item conversion manager
Inventory listener
Crafting listener
Smithing listener
Pickup listener
Block/loot listener
Permission manager
Message manager
Utility classes
Do not put the entire plugin into one enormous Java class.
32. README
Include a complete README explaining:
What the plugin does
Requirements
Installation
Paper version
Java version
Geyser compatibility
Commands
Permissions
Configuration
INVENTORY GUI controls
Existing item policies
How Netherite conversion works
Known limitations
33. Important Requirement
The final result must be a complete, compilable, working plugin, not pseudocode.
Provide every required source file and configuration file.
Make sure:
There are no missing classes
There are no placeholder methods
There are no TODO sections instead of implementation
Imports are correct
Event handlers use the correct Paper 1.21.11 APIs
plugin.yml is correct
Maven dependencies are correct
The project compiles successfully
The plugin can be placed directly into a Paper server's plugins folder after building
Before providing the final code, check the implementation for API compatibility with Paper/Minecraft 1.21.11 and fix deprecated or incompatible API usage where possible.
Also explain any Minecraft/Paper/Geyser limitations that cannot be completely solved through the Bukkit/Paper API.
This version should give a coding AI much less room to misunderstand the idea, especially around existing Netherite items, trims, inventories, smithing, Geyser, and item-data preservation.
Create the Maven/Paper project metadata and server resource files.
Implement configuration, messages, item conversion, and policy services.
Add the admin command, tab completion, GUI manager, and settings GUI.
Register event-driven restrictions for equipment, materials, crafting, smithing, loot, containers, pickups, and conversions.
Add installation and limitation documentation.
Created the Netherite Manager Paper plugin project with:
Maven build targeting Java 21 and Paper 1.21.11
/netheritemanagercommand with reload, status, help, permissions, and tab completionAdministrator inventory GUI with toggles for:
Netherite armour and tools
Armour trims
Ancient Debris
Netherite Scrap and Ingots
Upgrade Templates
Smithing and crafting
Existing-item policy
Configurable
CONVERT,KEEP,DELETE, andBLOCK_USEpoliciesMetadata-preserving Netherite-to-Diamond conversion
Event-driven restrictions for:
Player inventories
Pickups
Crafting
Smithing
Smelting
Loot
Hopper movement
Container interaction
Player joining and death
Configurable messages and logging
Geyser/Floodgate-compatible Bukkit/Paper implementation
README covering installation, commands, configuration, policies, and API limitations
now make for 26.2 and support via version and backward
Update the build to target Paper 26.2 while retaining a 1.21-compatible baseline.
Isolate any version-sensitive behavior so one jar can run on both versions.
Update the declared compatibility documentation without changing unrelated plugin behavior.
Added a Maven
paper-26.2profile using Paper API26.2.build.123-stable.Kept the default build on Paper
1.21.11for backward compatibility.Configured Java 21 for 1.21 and Java 25 for Paper 26.2.
Added safer material conversion when a replacement material is unavailable.
Updated artifact names and README requirements/build commands.
Build commands:
mvn package
Produces:
target/NetheriteManager.jar
Paper 26.2 build:
mvn -Ppaper-26.2 package
Produces:
target/NetheriteManager-26.2.jar
The plugin descriptor remains at:
api-version: '1.21'
so the default build remains backward-compatible with supported 1.21 servers.
package com.kodari.netheritemanager;
import com.kodari.netheritemanager.command.NetheriteCommand;
import com.kodari.netheritemanager.config.SettingsManager;
import com.kodari.netheritemanager.gui.AdminMenu;
import com.kodari.netheritemanager.item.NetheriteItemService;
import com.kodari.netheritemanager.listener.GameplayListener;
import com.kodari.netheritemanager.listener.InventoryListener;
import com.kodari.netheritemanager.message.MessageManager;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
public final class NetheriteManagerPlugin extends JavaPlugin {
private SettingsManager settings;
private MessageManager messages;
private NetheriteItemService items;
private AdminMenu menu;
private FileConfiguration messagesConfig;
@Override
public void onEnable() {
saveDefaultConfig();
saveResource("messages.yml", false);
reloadMessages();
settings = new SettingsManager(this);
messages = new MessageManager(this);
items = new NetheriteItemService(this, settings);
menu = new AdminMenu(this, settings, messages, items);
NetheriteCommand command = new NetheriteCommand(this, settings, messages, menu, items);
if (getCommand("netheritemanager") != null) {
getCommand("netheritemanager").setExecutor(command);
getCommand("netheritemanager").setTabCompleter(command);
}
register(new GameplayListener(this, items, messages));
register(new InventoryListener(this, items, menu));
}
private void register(Listener listener) {
Bukkit.getPluginManager().registerEvents(listener, this);
}
public void reloadMessages() {
reloadConfig();
messagesConfig = org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(
new java.io.File(getDataFolder(), "messages.yml"));
}
public FileConfiguration getMessages() {
return messagesConfig;
}
public SettingsManager settings() {
return settings;
}
public MessageManager messages() {
return messages;
}
public NetheriteItemService items() {
return items;
}
public AdminMenu menu() {
return menu;
}
}