📎
1 file
9,918 chars
📄
pasted-code-1794914002640.txt
txt
492 lines
▶
pasted-code-1794914002640.txt
txt
492 lines
PREMIUM MINECRAFT SHOP PLUGIN
COMPLETE PROJECT DEVELOPMENT – PAPER 1.21.11
Build a complete, professional, fully functional Minecraft Shop Plugin for my Minecraft server.
1. FIXED DEVELOPMENT ENVIRONMENT
- Minecraft Version: 1.21.11
- Server Software: Paper
- Plugin Language: Java
- Java Version: Java 21 (or the minimum version officially required by the selected Paper 1.21.11 build)
- Build System: Maven or Gradle
- Economy Integration: Vault
- Output: Working .jar plugin file
IMPORTANT:
Do not change the Minecraft version, Paper server software, or project configuration to another version.
Use the correct Paper API for Minecraft 1.21.11.
2. MAIN SHOP GUI
Create a premium Minecraft inventory-based shop.
The main shop must have these 6 categories:
1. Redstone
2. Farming
3. Food
4. War Items
5. Block Items
6. Extra Items
GUI Design:
- Premium professional inventory GUI.
- Clean and organized layout.
- Attractive category icons.
- Custom item names and descriptions.
- Dark-themed premium aesthetic using Minecraft item names and colored lore.
- Proper navigation buttons.
- Back button.
- Close button.
- Next and Previous page buttons.
- Item search system.
- No broken or non-functional buttons.
3. REDSTONE CATEGORY
Include all relevant obtainable Redstone items:
Redstone Dust, Redstone Block, Redstone Torch, Repeater, Comparator, Piston, Sticky Piston, Observer, Dispenser, Dropper, Hopper, Target Block, Lever, Buttons, Pressure Plates, Tripwire Hook, Tripwire, Redstone Lamp, Daylight Detector, Note Block, Crafter, Rails, Minecart, TNT and other Redstone components.
Pricing:
- Buy: $20 per item.
- Sell: $1–$5 depending on the item.
- Both buying and selling enabled.
4. FARMING CATEGORY
Include all farming and mob-drop items.
Farming:
- Wheat
- Wheat Seeds
- Sugar Cane
- Bamboo
- Cactus
- Carrot
- Potato
- Beetroot
- Beetroot Seeds
- Melon
- Melon Seeds
- Pumpkin
- Pumpkin Seeds
- Nether Wart
- Cocoa Beans
- Sweet Berries
- Glow Berries
- Kelp
- Mushrooms
- Moss Block
- Other farming materials.
Mob Drops:
- Rotten Flesh
- Bone
- String
- Spider Eye
- Gunpowder
- Slime Ball
- Leather
- Feather
- Ink Sac
- Blaze Rod
- Magma Cream
- Phantom Membrane
- Other obtainable mob drops.
Pricing:
- SELL ONLY.
- No buying option.
- Low selling prices.
- Sugar Cane: $1
- Bamboo: $0.50
- Wheat: $1
- Carrot: $1
- Potato: $1
- Rotten Flesh: $1
- String: $1.50
- Gunpowder: $3
5. FOOD CATEGORY
Include all obtainable food items.
Examples:
Bread, Apple, Golden Apple, Enchanted Golden Apple, Golden Carrot, Cooked Beef, Raw Beef, Cooked Porkchop, Raw Porkchop, Cooked Chicken, Raw Chicken, Cooked Mutton, Raw Mutton, Cooked Rabbit, Cooked Cod, Cooked Salmon, Baked Potato, Pumpkin Pie, Cookie, Cake, Mushroom Stew, Rabbit Stew, Beetroot Soup, Suspicious Stew, Sweet Berries and other food items.
Pricing:
- BUY ONLY.
- No selling option.
- Normal food should have very low prices.
Special prices:
- Golden Apple: $100
- Golden Carrot: $100
- Enchanted Golden Apple: $1,000
6. WAR ITEMS CATEGORY
Include PvP and combat items:
- End Crystal
- Obsidian
- Totem of Undying
- Wind Charge
- Breeze Rod
- Respawn Anchor
- Glowstone
- Glowstone Dust
- Experience Bottle
- Ender Pearl
- Netherite Ingot
- Netherite Scrap
- Shield
- Trident
- Crossbow
- Bow
- Arrow
- Spectral Arrow
- Firework Rocket
- TNT
- Flint and Steel
- Other obtainable combat items.
Pricing:
- BUY ONLY.
- No selling option.
Example prices:
- Obsidian: $20
- Glowstone: $15
- Wind Charge: $30
- Experience Bottle: $15
- Respawn Anchor: $250
- End Crystal: $500
- Totem of Undying: $1,000
7. BLOCK ITEMS CATEGORY
Automatically include all survival-obtainable building blocks available in Minecraft 1.21.11.
Include:
- Overworld blocks
- Nether blocks
- End blocks
- Stone and Deepslate variants
- Wood and Planks
- Logs
- Glass and Stained Glass
- Concrete
- Terracotta
- Wool
- Bricks
- Sand
- Sandstone
- Gravel
- Dirt
- Ice
- Quartz
- Copper variants
- Prismarine
- Decorative blocks
- Other obtainable building blocks.
Pricing:
- BUY AND SELL.
- Normal affordable prices.
- Buy price must be higher than sell price.
- Prices must depend on rarity and usefulness.
Do not include technical or unobtainable blocks such as Air, Barrier and command-only blocks.
8. EXTRA ITEMS CATEGORY
Include crafting, utility and workstation items.
Crafting and Workstations:
- Crafting Table
- Furnace
- Blast Furnace
- Smoker
- Anvil
- Chipped Anvil
- Damaged Anvil
- Grindstone
- Smithing Table
- Cartography Table
- Fletching Table
- Loom
- Stonecutter
- Brewing Stand
- Enchanting Table
- Bookshelf
- Lectern
- Composter
- Barrel
- Chest
- Trapped Chest
- Ender Chest
- Shulker Box
Utility Items:
- Bucket
- Water Bucket
- Lava Bucket
- Milk Bucket
- Shears
- Fishing Rod
- Compass
- Recovery Compass
- Clock
- Spyglass
- Name Tag
- Lead
- Saddle
- Item Frame
- Glow Item Frame
- Painting
- Armor Stand
- Book
- Paper
- Book and Quill
- Fire Charge
- Torch
- Lantern
- Soul Lantern
- Chains
- Ladder
- Scaffolding
- Other useful utility items.
Pricing:
- BUY ONLY.
- No selling option.
- Normal and balanced prices.
9. PLAYER HEAD AND BALANCE DISPLAY
This feature is very important.
In the main shop GUI:
- Place the player's own Minecraft head in the bottom-left corner.
- Use the actual player's skin.
- Show the player's username.
- Show the player's current Vault balance when hovering over the head.
Example:
Display Name:
&b&lYOUR PROFILE
Lore:
&7Player: &f%player_name%
&7Balance: &a$%balance%
&eYour Shop Account
Requirements:
- Every player must see their own head.
- Balance must be retrieved from the actual economy provider.
- Balance must update after every transaction.
- Never use a hardcoded balance.
10. BUY AND SELL SYSTEM
Create a fully working transaction GUI.
When clicking an item, display:
- Item name.
- Item quantity.
- Buy price.
- Sell price, if supported.
- Confirm button.
- Cancel button.
Quantity options:
- 1x
- 8x
- 16x
- 32x
- 64x
Rules:
- Buy-only categories must never show a Sell button.
- Sell-only categories must never show a Buy button.
- Buy-and-sell categories must show both.
- Calculate the total price correctly.
- Check the player's balance before purchasing.
- Check inventory space before giving items.
- Check the player's actual item quantity before selling.
11. VAULT ECONOMY
Integrate Vault API.
Requirements:
- Connect to a compatible economy provider.
- Deposit and withdraw money correctly.
- Prevent negative balances.
- Prevent duplicate transactions.
- Prevent item duplication.
- Handle insufficient balance.
- Handle full inventory.
- Handle missing economy providers safely.
Messages:
Successful Purchase:
&8[&bSHOP&8] &aPurchase successful!
Successful Sale:
&8[&bSHOP&8] &aItems sold successfully!
Insufficient Balance:
&8[&bSHOP&8] &cYou don't have enough money!
12. COMMANDS AND PERMISSIONS
Commands:
/shop
/shop reload
/shop help
Permissions:
- shop.use
- shop.admin
Only authorized administrators can reload the configuration.
13. CONFIGURATION FILES
Create:
- config.yml
- prices.yml
- messages.yml
Allow administrators to customize:
- Item prices.
- Buy and sell availability.
- Category names.
- GUI titles.
- GUI item slots.
- Messages.
- Item availability.
All prices must be configurable without editing Java source code.
14. ADVANCED DEVELOPMENT REQUIREMENTS
- Use proper Java OOP architecture.
- Separate GUI, economy, commands, listeners and configuration classes.
- Use Paper API compatible with 1.21.11.
- Use correct Material enum constants.
- Use safe inventory event handling.
- Prevent GUI item duplication.
- Prevent shift-click exploits.
- Prevent double-click transaction exploits.
- Handle player disconnections safely.
- Handle invalid configuration values.
- Avoid unnecessary repeating tasks.
- Avoid memory leaks.
- Keep the plugin lightweight and optimized.
Do not put all functionality inside one giant Java class.
15. PROJECT FILE STRUCTURE
Create a professional project structure similar to:
ShopPlugin/
├── pom.xml
├── src/
│ └── main/
│ ├── java/
│ │ └── your/package/shop/
│ │ ├── ShopPlugin.java
│ │ ├── commands/
│ │ ├── gui/
│ │ ├── economy/
│ │ ├── listeners/
│ │ ├── managers/
│ │ └── utils/
│ └── resources/
│ ├── plugin.yml
│ ├── config.yml
│ ├── prices.yml
│ └── messages.yml
└── target/
└── ShopPlugin.jar
16. BUILD AND TESTING
Before finishing:
1. Inspect the complete project.
2. Verify Paper 1.21.11 compatibility.
3. Verify Java version compatibility.
4. Verify all imports and dependencies.
5. Verify plugin.yml.
6. Compile the complete project.
7. Fix every compilation error.
8. Check for missing methods and classes.
9. Check all six categories.
10. Test all GUI buttons.
11. Test buying and selling.
12. Test Vault economy integration.
13. Test player head and balance display.
14. Test inventory-full situations.
15. Fix all runtime exceptions.
Do not claim the plugin is working unless the build and tests actually succeed.
17. FINAL DELIVERABLE
I need:
1. Complete Java source code.
2. Complete project folder.
3. All configuration files.
4. Working Paper 1.21.11 plugin.
5. Successfully compiled JAR file.
6. Installation instructions.
Place the final JAR inside the build output folder.
If access to my Minecraft server folder is available, install it into the plugins folder. Otherwise, provide the JAR so I can install it manually.
IMPORTANT FINAL INSTRUCTION:
Do not create just a frontend, mockup or demo.
Build a real, complete and functional Minecraft Java plugin for Paper 1.21.11.
Do not leave placeholder code, TODOs, fake buttons or unfinished functionality.
First inspect the project, then implement, compile, test and fix errors before declaring completion.
KodariTue at 11:16 am 9
PremiumShopGUI
A comprehensive Paper 1.21.11 shop plugin with six categorized GUI menus (Redstone, Farming, Food, War Items, Block Items, Extra Items). Features Vault economy integration for buy/sell transactions, player head and balance display in the main menu, configurable prices via YAML files, transaction confirmation GUI with quantity selection, and full command/permission support. Implements safe inventory event handling to prevent duplication exploits, lazy-initialized GUI framework, and modular OOP architecture separating commands, GUI, economy, listeners, and configuration classes.
Created the shop source and configuration for Paper 1.21.11, including Vault transactions, six categories, search, and the player balance display.
Not yet verified: I couldn’t compile or run server tests here, so a working JAR cannot be guaranteed. The automatically selected building blocks and default prices also need review against your complete item and rarity requirements.
To build it in Kodari, click Compile in the top bar, then Compile in the window. If it succeeds, download the JAR and place it in your server’s plugins folder alongside Vault and a compatible economy provider. On mobile, use ⋮ → Compile Project.
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
12 534
src/main/java/com/kodari/premiumshop/ShopPlugin.java
package com.kodari.premiumshop;
import com.kodari.premiumshop.commands.ShopCommand;
import com.kodari.premiumshop.gui.ShopMenus;
import com.kodari.premiumshop.listeners.ShopListener;
import com.kodari.premiumshop.managers.ShopConfig;
import org.bukkit.plugin.java.JavaPlugin;
public final class ShopPlugin extends JavaPlugin {
private ShopConfig shopConfig;
private ShopMenus menus;
@Override
public void onEnable() {
saveDefaultConfig();
saveResource("prices.yml", false);
saveResource("messages.yml", false);
shopConfig = new ShopConfig(this);
shopConfig.reload();
menus = new ShopMenus(this, shopConfig);
getServer().getPluginManager().registerEvents(new ShopListener(this, menus), this);
getCommand("shop").setExecutor(new ShopCommand(this, shopConfig, menus));
}
@Override
public void onDisable() {
if (menus != null) menus.closeAll();
}
}