Description
Create a high-quality, modern trading plugin for my Paper server called PremiumTrade that allows players to securely trade items, CoinsEngine coins, Essentials money, experience points or levels, and GriefPrevention claim blocks using a beautiful premium GUI. The main command is /trade <playername> to send a trade request to another player, and the receiving player can use /trade accept or /trade deny. Once both players accept, open a secure double-chest style trading interface with a clean, animated, professional design featuring colored glass pane borders, glowing effects, custom item icons, sounds on clicks, and a sidebar or lore showing each player's current balances. Each player should have their own side of the GUI with plenty of slots for regular items, plus dedicated areas or buttons to add amounts of CoinsEngine coins, Essentials money, XP points or levels, and GriefPrevention claim blocks, including real-time balance previews and the ability to input exact amounts via chat or signs after clicking the currency icons. Show a live preview of what the other player is offering at all times. Include a locking system where each player must first click a Lock button to confirm their offer cannot be changed anymore, and only after both have locked should the green Accept buttons become available. When both players click Accept, safely complete the trade by transferring items to inventories, adjusting CoinsEngine balances, taking and giving Essentials money, adding or removing XP using player experience methods, and transferring the specified number of GriefPrevention claim blocks using their API. Add strong anti-scam and anti-dupe protections such as cancelling the trade if anyone disconnects, closes the inventory early, goes into combat, or takes too long without action, plus logging of all completed trades. Include a config file to enable or disable specific currency types, set maximum trade distance, cooldown between trades, blacklisted items or worlds, and customizable messages with MiniMessage support. Make the plugin depend on or soft-depend on CoinsEngine, Essentials, and GriefPrevention, include proper permissions like premiumtrade.use and premiumtrade.admin for reload and other admin features, and generate clean, efficient, well-commented Java code with all necessary classes, event listeners for inventory clicks, player quit, and so on, ready to compile and drop into the plugins folder for a 1.20+ Paper server.