MittensTrade – Premium Trash & Trading Plugin
Create a complete, fully functional Minecraft Paper plugin called MittensTrade.
Plugin author: MRBEAN137 Minecraft version: 1.21.11 Platform: Paper Language: Java
I want two premium systems: a fully working "/trash" GUI and a fully working player-to-player "/trade" system.
Do not create fake GUIs or placeholder functionality. Everything must work on a live Minecraft server.
- /trash – Premium Trash GUI
Create a premium trash GUI opened using "/trash".
GUI Design
- Inventory size: 54 slots (6 rows).
- Title: "&8Trash Bin"
- Surround the outer edges with stained glass panes.
- Use black and purple stained glass panes for a premium appearance.
- Keep the middle section empty so players can place items inside.
- Place a Lava Bucket in the bottom-middle slot.
- Lava Bucket name: "&c&lDELETE ITEMS"
- Lore:
- "&7Click to permanently delete" - "&7all items inside the trash bin." - "&cThis action cannot be undone!"
Functionality
- Players can place and move items inside the GUI.
- Players can remove items before deleting them.
- Clicking the Lava Bucket must permanently delete all items inside.
- Add a confirmation GUI before permanently deleting items.
- Closing the GUI without deleting must safely return all remaining items.
- If the player's inventory is full, drop remaining items safely at their location.
- Prevent players from taking decorative glass panes or the Lava Bucket.
- Prevent shift-click, drag, double-click and number-key exploits.
- Never delete items accidentally when closing the GUI.
- /trade – Premium Player Trading System
Create a fully functional player-to-player trading system.
Commands
"/trade <player>"
- Sends a trade request to the specified player.
- Sends the recipient a premium trade request message.
- Opens a request GUI for the recipient.
- Request title: "&d&lTRADE REQUEST"
- Lore: "&7<Player> wants to trade with you!"
- Green stained glass pane named "&a&lACCEPT".
- Red stained glass pane named "&c&lDENY".
"/trade accept <player>"
- Accepts a pending request from that player.
- Opens the trading GUI for both players.
"/trade deny <player>"
- Denies the pending request.
- Notifies both players.
Trade Request Features
- Requests must expire after 60 seconds.
- Players cannot send requests to themselves.
- Players cannot send multiple duplicate requests.
- Players cannot accept expired requests.
- Players cannot trade with offline players.
- Players cannot have multiple active trades.
- Display clear success and error messages.
- Premium Trading GUI
Create a premium trading GUI for both players.
GUI Design
- Inventory size: 54 slots.
- Title: "&8Trading with <player>"
- Use black and purple stained glass panes around the outside.
- Divide the GUI into two clearly marked trading sections.
- Left side: Your offered items.
- Right side: Other player's offered items.
- Use a decorative divider between both sides.
- Add a green emerald named "&a&lCONFIRM TRADE".
- Add a red dye named "&c&lCANCEL TRADE".
- Add player heads identifying each trader.
- Display usernames and offered item counts in the lore.
- Make the GUI look professional, clean and premium.
Trading Functionality
Both players must be able to:
- Place items into their own trading area.
- Remove items from their own trading area.
- View the other player's offered items.
- Confirm their trade independently.
- Cancel the trade at any time before completion.
Confirmation System
- Both players must click CONFIRM TRADE.
- Show each player's confirmation status.
- If either player changes their offered items, reset BOTH confirmation statuses.
- Only complete the trade when both players have confirmed.
- Transfer all offered items to the opposite player.
- Never allow players to take items from the other player's trading section.
- Prevent any items from disappearing or duplicating.
- Trade Security – Extremely Important
Implement proper security for every trading interaction.
Prevent:
- Item duplication.
- Shift-click exploits.
- Number-key swapping exploits.
- Double-click collection exploits.
- Drag exploits.
- Hopper interaction exploits.
- Taking items from another player's trading section.
- Modifying another player's offer.
- Opening multiple simultaneous trades.
- Trading with yourself.
- Completing trades with offline players.
Additional requirements:
- If either player disconnects, cancel the trade and return all items.
- If either player dies during a trade, safely cancel the trade and return all items.
- If either player closes the trading GUI, cancel the trade and return all items.
- Check both inventories before completing a trade.
- If either player lacks inventory space, do not complete the trade.
- Do not partially complete a trade.
- Handle item transfers safely and atomically.
- Make sure cancellation always returns every item to its original owner.
- Premium Chat Messages
Use consistent premium formatting.
Examples:
"&8[&d&lTRADE&8] &7You sent a trade request to &d<Player>&7."
"&8[&d&lTRADE&8] &7You received a trade request from &d<Player>&7."
"&8[&d&lTRADE&8] &aTrade successfully completed!"
"&8[&d&lTRADE&8] &cTrade cancelled."
"&8[&d&lTRADE&8] &cYour inventory does not have enough space!"
"&8[&d&lTRADE&8] &cYou do not have a pending request from that player."
- Permissions
Implement:
- "premiumtrash.use" – Access to /trash.
- "premiumtrade.use" – Access to /trade.
- "premiumtrade.admin" – Administrative trade management.
Allow normal players to use both systems by default unless permissions are configured otherwise.
- Technical Requirements
- Minecraft Java 1.21.11.
- Paper API 1.21.11.
- Use the correct Java version required by the target Paper build.
- Use Maven or Gradle.
- Include a valid plugin.yml.
- Plugin name: "MittensTrade".
- Plugin author: "MRBEAN137".
- Correctly register the main class.
- Register all commands and event listeners.
- Use UUIDs instead of usernames internally.
- Use a proper session-based trading system.
- Prevent race conditions and item duplication.
- Use safe inventory handling.
- Keep the plugin lightweight.
- No unnecessary dependencies.
- Final Deliverables
I want the COMPLETE working source code and compiled plugin JAR.
Include:
- All Java source files.
- plugin.yml.
- pom.xml or build.gradle.
- Any required configuration files.
- A compiled "MittensTrade.jar".
- Testing Before Delivery
Before finishing:
- Compile the entire project.
- Fix every compilation error.
- Verify "/trash" works.
- Verify "/trade <player>" works.
- Verify "/trade accept <player>" works.
- Verify "/trade deny <player>" works.
- Test both players adding and removing items.
- Test confirmation and successful trading.
- Test cancellations.
- Test disconnect and death scenarios.
- Test full inventory scenarios.
- Test for item duplication exploits.
FINAL IMPORTANT INSTRUCTIONS:
I do not want just Java code or a GUI mockup. I want an actual working Minecraft Paper 1.21.11 plugin.
Compile the project and provide the finished "MittensTrade.jar" ready to upload into my server's plugins folder.
Do not claim that something has been tested if it has not actually been tested.
Prioritise functionality, item safety and reliability over unnecessary visual effects.
Create the Paper 1.21.11 Java project and plugin metadata.
Implement
/trashwith confirmation and safe item returns.Implement session-based
/traderequests, GUI offers, confirmation, and cancellation safeguards.
Created the MittensTrade source project with /trash, confirmed deletion, trade requests, session-based trading, and cancellation handling for closes, disconnects, and deaths. The Gradle jar name is configured as MittensTrade.jar.
I haven’t compiled it or tested it on a live server, so I can’t claim those checks passed. To build and download the JAR in Kodari: click Compile in the top bar (on phone: ⋮ → Compile Project), click Compile in the window, then click Download on the successful build.
package com.mrbean137.mittenstrade;
import com.mrbean137.mittenstrade.command.MittensCommand;
import com.mrbean137.mittenstrade.trade.TradeManager;
import com.mrbean137.mittenstrade.trash.TrashManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;
public final class MittensTradePlugin extends JavaPlugin {
private TradeManager tradeManager;
private TrashManager trashManager;
@Override
public void onEnable() {
tradeManager = new TradeManager(this);
trashManager = new TrashManager(this);
Bukkit.getPluginManager().registerEvents(tradeManager, this);
Bukkit.getPluginManager().registerEvents(trashManager, this);
MittensCommand command = new MittensCommand(tradeManager, trashManager);
getCommand("trade").setExecutor(command);
getCommand("trade").setTabCompleter(command);
getCommand("trash").setExecutor(command);
}
@Override
public void onDisable() {
if (tradeManager != null) {
tradeManager.shutdown();
}
if (trashManager != null) {
trashManager.shutdown();
}
}
}