๐
pasted-code-1792151469428.txt
txt
183 lines
โถ
Minecraft Purpur All-in-One Plugin
Create a complete Minecraft Java plugin for a Purpur server. Deliver one working ".jar" file with complete source code, build files, configuration, installation instructions, commands, and permissions. Ask for the exact Minecraft/Purpur version if it is unknown.
1. Main Shop โ "/shop"
Create a GUI with three categories: Food Shop, Spawner Shop, and God Tools. All purchases use Diamonds.
Food Shop prices
- 16 Steak = 1 Diamond
- 16 Golden Carrots = 2 Diamonds
- 2 Golden Apples = 3 Diamonds
- 16 Cooked Porkchops = 1 Diamond
- 32 Bread = 1 Diamond
Do not include enchanted golden apples or fish.
Purchases must be safe: never charge Diamonds without delivering the purchased items.
2. Spawner Shop
Only four spawner types are available.
Skeleton Spawner โ 5 Diamonds
- Initial stock: 64 Bones, 2 Bows, 64 Arrows
- Production: 3 Bones/second, 1 Bow/minute, 1 Arrow every 2 seconds
Creeper Spawner โ 8 Diamonds
- Initial stock: 64 Gunpowder
- Production: 2 Gunpowder/second
- Gunpowder is the only item this spawner produces and stores. Do not add TNT.
Zombie Spawner โ 5 Diamonds
- Initial stock: 32 Iron Ingots, 32 Copper Ingots, 64 Rotten Flesh
- Production: 2 Iron Ingots/second
- Copper Ingots and Rotten Flesh production must be configurable.
Spider Spawner โ 4 Diamonds
- Initial stock: 64 String, 32 Spider Eyes
- Production: 1 String every 3 seconds
- Spider Eyes production must be configurable.
Make all production rates configurable.
3. Spawner Stacking and Storage
- Same-type spawners can stack in one placed block; different types cannot.
- Each spawner provides 54 storage slots.
- Storage scales with the number of stacked spawners: 1 = 54 slots, 2 = 108 slots, 5 = 270 slots.
- Make the stack limit configurable.
- Display the spawner type, stack count, stored quantities, and production rates.
- Breaking or moving a stacked spawner must preserve its complete stack and stored items.
- Prevent item duplication and data loss.
- Save all storage persistently across server restarts.
4. Spawner Right-Click GUI
Right-clicking a spawner opens its GUI. Do not include a Collect All button.
Provide separate buttons for each item:
- Skeleton: Drop Bones, Drop Arrows, Drop Bows.
- Creeper: Drop Gunpowder only.
- Zombie: Drop Iron Ingots, Drop Copper Ingots, Drop Rotten Flesh.
- Spider: Drop String, Drop Spider Eyes.
Each button transfers the entire available quantity of only that item into the player's inventory. Show the quantity on each button.
If the inventory is full, transfer whatever fits and leave the remainder in storage. Do not delete items or throw them onto the ground. Stacked spawners must use their combined storage.
5. Selling System
Commands:
- "/sell" โ open the selling menu or display usage.
- "/sell hand" โ sell eligible items from the player's hand.
- "/sell all" โ sell all eligible items in the player's inventory.
- "/sell claim" โ withdraw available Diamonds from the Diamond Bank.
Selling prices:
- 32 Bones = 1 Diamond
- 16 Gunpowder = 1 Diamond
- 64 Rotten Flesh = 1 Diamond
- 64 Arrows = 1 Diamond
- 32 String = 1 Diamond
- 32 Spider Eyes = 1 Diamond
- 16 Iron Ingots = 1 Diamond
Display the items sold and Diamonds earned. Never remove items unless their payment has been successfully recorded. Handle incomplete quantities consistently.
6. Diamond Bank
All earnings from "/sell all" must be saved to a persistent, individual player Diamond Bank instead of automatically entering their inventory.
Requirements:
- Six GUI pages, each containing 54 slots.
- Previous and Next page navigation.
- Persistent player balances across restarts.
- Display the player's available Diamond balance.
- "/sell claim" safely transfers available Diamonds to inventory.
- Prevent duplication and loss during deposits or withdrawals.
Keep the numeric Diamond balance as the authoritative record. The six pages can display virtual storage or transaction records; if actual virtual item storage is implemented, ensure stored Diamonds cannot also be counted in the numeric balance.
7. Emathyst Pickaxe โ 64 Diamonds
Base item: Netherite Pickaxe.
Common enchantments: Efficiency V, Unbreaking III, Mending I.
Silk Touch Mode
- Silk Touch I
- Efficiency V, Unbreaking III, Mending I
- 3ร3 Mining OFF
- Vein Miner OFF
- Auto-Smelt OFF
Emathyst Pickaxe Mode
- Efficiency V, Unbreaking III, Mending I
- Silk Touch disabled
- 3ร3 Mining ON
- Vein Miner ON
- Auto-Smelt ON
Switch modes by holding the pickaxe and using sneak + right-click, with a 10-second cooldown. Display the active mode.
Supported 3ร3 blocks:
- Stone, Cobblestone, Deepslate, Cobbled Deepslate
- Standard overworld ores
- Sandstone, Dirt, Andesite
Do not apply 3ร3 mining to wood.
Vein Miner must mine connected matching ores with a configurable limit. All mining must respect protection plugins and player permissions.
Auto-Smelt must use valid server recipes. Stone must never be smelted or transformed.
Disable anvil repair and combining for this custom pickaxe, but allow Mending through XP orbs. Use persistent item identifiers to prevent normal pickaxes from receiving custom abilities.
8. Tree Chopper โ 64 Diamonds
Base item: Netherite Axe.
Enchantments: Efficiency V, Unbreaking III, Mending I.
Breaking a supported tree log must break connected logs belonging to that tree.
- Do not break leaves, planks, chests, or unrelated structures.
- Add a configurable maximum log limit.
- Respect region protection and player permissions.
- Disable anvil repair and combining while allowing Mending through XP orbs.
- Use a persistent custom item identifier.
9. Administration and Configuration
Provide permissions and admin commands for inspecting spawners, managing bank balances, reloading configuration safely, and configuring shop prices, production rates, stack limits, mining limits, and feature settings.
Protect all player data and prevent unauthorized access to another player's storage or bank.
10. Testing and Final Delivery
Test compilation, purchases, spawner production, stacking, individual drop buttons, storage persistence, selling, bank deposits and withdrawals, full inventories, tool modes, cooldowns, mining features, and protection checks.
Deliver:
- The compiled ".jar"
- Complete source code and build files
- Default configuration
- Installation guide
- Commands and permissions list
- Honest testing results
Do not provide pseudocode or claim untested features work. Do not silently remove or change requirements. If any requirement is incompatible with the selected server version, explain why before changing it.
What exact Minecraft/Purpur version should this target (for example, Purpur 1.21.4)?
Minecraft Purpur All-in-One Plugin
Create a complete Minecraft Java plugin for a Purpur server. Deliver one working ".jar" file with complete source code, build files, configuration, installation instructions, commands, and permissions. Ask for the exact Minecraft/Purpur version if it is unknown.
- Main Shop โ "/shop"
Create a GUI with three categories: Food Shop, Spawner Shop, and God Tools. All purchases use Diamonds.
Food Shop prices
- 16 Steak = 1 Diamond
- 16 Golden Carrots = 2 Diamonds
- 2 Golden Apples = 3 Diamonds
- 16 Cooked Porkchops = 1 Diamond
- 32 Bread = 1 Diamond
Do not include enchanted golden apples or fish.
Purchases must be safe: never charge Diamonds without delivering the purchased items.
- Spawner Shop
Only four spawner types are available.
Skeleton Spawner โ 5 Diamonds
- Initial stock: 64 Bones, 2 Bows, 64 Arrows
- Production: 3 Bones/second, 1 Bow/minute, 1 Arrow every 2 seconds
Creeper Spawner โ 8 Diamonds
- Initial stock: 64 Gunpowder
- Production: 2 Gunpowder/second
- Gunpowder is the only item this spawner produces and stores. Do not add TNT.
Zombie Spawner โ 5 Diamonds
- Initial stock: 32 Iron Ingots, 32 Copper Ingots, 64 Rotten Flesh
- Production: 2 Iron Ingots/second
- Copper Ingots and Rotten Flesh production must be configurable.
Spider Spawner โ 4 Diamonds
- Initial stock: 64 String, 32 Spider Eyes
- Production: 1 String every 3 seconds
- Spider Eyes production must be configurable.
Make all production rates configurable.
- Spawner Stacking and Storage
- Same-type spawners can stack in one placed block; different types cannot.
- Each spawner provides 54 storage slots.
- Storage scales with the number of stacked spawners: 1 = 54 slots, 2 = 108 slots, 5 = 270 slots.
- Make the stack limit configurable.
- Display the spawner type, stack count, stored quantities, and production rates.
- Breaking or moving a stacked spawner must preserve its complete stack and stored items.
- Prevent item duplication and data loss.
- Save all storage persistently across server restarts.
- Spawner Right-Click GUI
Right-clicking a spawner opens its GUI. Do not include a Collect All button.
Provide separate buttons for each item:
- Skeleton: Drop Bones, Drop Arrows, Drop Bows.
- Creeper: Drop Gunpowder only.
- Zombie: Drop Iron Ingots, Drop Copper Ingots, Drop Rotten Flesh.
- Spider: Drop String, Drop Spider Eyes.
Each button transfers the entire available quantity of only that item into the player's inventory. Show the quantity on each button.
If the inventory is full, transfer whatever fits and leave the remainder in storage. Do not delete items or throw them onto the ground. Stacked spawners must use their combined storage.
- Selling System
Commands:
- "/sell" โ open the selling menu or display usage.
- "/sell hand" โ sell eligible items from the player's hand.
- "/sell all" โ sell all eligible items in the player's inventory.
- "/sell claim" โ withdraw available Diamonds from the Diamond Bank.
Selling prices:
- 32 Bones = 1 Diamond
- 16 Gunpowder = 1 Diamond
- 64 Rotten Flesh = 1 Diamond
- 64 Arrows = 1 Diamond
- 32 String = 1 Diamond
- 32 Spider Eyes = 1 Diamond
- 16 Iron Ingots = 1 Diamond
Display the items sold and Diamonds earned. Never remove items unless their payment has been successfully recorded. Handle incomplete quantities consistently.
- Diamond Bank
All earnings from "/sell all" must be saved to a persistent, individual player Diamond Bank instead of automatically entering their inventory.
Requirements:
- Six GUI pages, each containing 54 slots.
- Previous and Next page navigation.
- Persistent player balances across restarts.
- Display the player's available Diamond balance.
- "/sell claim" safely transfers available Diamonds to inventory.
- Prevent duplication and loss during deposits or withdrawals.
Keep the numeric Diamond balance as the authoritative record. The six pages can display virtual storage or transaction records; if actual virtual item storage is implemented, ensure stored Diamonds cannot also be counted in the numeric balance.
- Emathyst Pickaxe โ 64 Diamonds
Base item: Netherite Pickaxe.
Common enchantments: Efficiency V, Unbreaking III, Mending I.
Silk Touch Mode
- Silk Touch I
- Efficiency V, Unbreaking III, Mending I
- 3ร3 Mining OFF
- Vein Miner OFF
- Auto-Smelt OFF
Emathyst Pickaxe Mode
- Efficiency V, Unbreaking III, Mending I
- Silk Touch disabled
- 3ร3 Mining ON
- Vein Miner ON
- Auto-Smelt ON
Switch modes by holding the pickaxe and using sneak + right-click, with a 10-second cooldown. Display the active mode.
Supported 3ร3 blocks:
- Stone, Cobblestone, Deepslate, Cobbled Deepslate
- Standard overworld ores
- Sandstone, Dirt, Andesite
Do not apply 3ร3 mining to wood.
Vein Miner must mine connected matching ores with a configurable limit. All mining must respect protection plugins and player permissions.
Auto-Smelt must use valid server recipes. Stone must never be smelted or transformed.
Disable anvil repair and combining for this custom pickaxe, but allow Mending through XP orbs. Use persistent item identifiers to prevent normal pickaxes from receiving custom abilities.
- Tree Chopper โ 64 Diamonds
Base item: Netherite Axe.
Enchantments: Efficiency V, Unbreaking III, Mending I.
Breaking a supported tree log must break connected logs belonging to that tree.
- Do not break leaves, planks, chests, or unrelated structures.
- Add a configurable maximum log limit.
- Respect region protection and player permissions.
- Disable anvil repair and combining while allowing Mending through XP orbs.
- Use a persistent custom item identifier.
- Administration and Configuration
Provide permissions and admin commands for inspecting spawners, managing bank balances, reloading configuration safely, and configuring shop prices, production rates, stack limits, mining limits, and feature settings.
Protect all player data and prevent unauthorized access to another player's storage or bank.
- Testing and Final Delivery
Test compilation, purchases, spawner production, stacking, individual drop buttons, storage persistence, selling, bank deposits and withdrawals, full inventories, tool modes, cooldowns, mining features, and protection checks.
Deliver:
- The compiled ".jar"
- Complete source code and build files
- Default configuration
- Installation guide
- Commands and permissions list
- Honest testing results
Do not provide pseudocode or claim untested features work. Do not silently remove or change requirements. If any requirement is incompatible with the selected server version, explain why before changing it.
What exact Minecraft/Purpur version should this plugin target (for example, Purpur 1.21.4)?
Paper 1.21.11
Set up the Paper 1.21.11 project, plugin metadata, and default configuration.
Implement the diamond shop, selling, and persistent bank.
Implement persistent stacked spawners, production, storage, and individual collection.
Implement the custom tools, admin controls, permissions, and installation guidance.
Created the Paper 1.21.11 project with the shop, selling and persistent Diamond Bank, owner-locked stacked spawners, custom tools, admin commands, default configuration, and installation/permissions guide.
Testing: No live-server gameplay tests were performed in this session. Compile and test on a staging server before production use.
Download the jar in Kodari: Click Compile in the top bar, click Compile in the window, then click Download on the successful build. The README lists commands, permissions, configuration, and installation steps.
What are the all commands for this plugin
Commands registered by the plugin (no aliases):
/shopโ Opens the shop. Permission:kodari.shop(default: everyone)./sellโ Opens the bank menu. Permission:kodari.sell(default: everyone)./sell handโ Sells eligible items in your main hand./sell allโ Sells eligible items from your inventory./sell claimโ Claims your bank balance.
/kadmin reloadโ Reloads the plugin configuration./kadmin spawner inspectโ Inspects the managed spawner youโre looking at./kadmin bank <player> <set|add> <amount>โ Sets or adds to a playerโs bank balance./kadmin config set <path> <value>โ Changes an allowed configuration setting.
All /kadmin commands require kodari.admin (default: op). The spawner and bank subcommands also require kodari.admin.spawner and kodari.admin.bank, respectively (both default: op). spawner inspect requires a player looking at a managed spawner.
Where is compile i can't see i am on mobile
On mobile, tap โฎ in the top-right corner, then Compile Project. In the window that opens, tap Compile. When it finishes, tap Download on the successful build.
๐
pasted-code-1792185430973.txt
txt
32 lines
โถ
Edit my existing Minecraft Paper 1.21.11 plugin. Do not create a new plugin from scratch. Preserve all existing features and make only these changes:
1. Update Spawner Prices
- Skeleton Spawner: 120 Diamonds each
- Zombie Spawner: 90 Diamonds each
- Creeper Spawner: 105 Diamonds each
- Spider Spawner: 60 Diamonds each
Update the "/shop" GUI to display the correct prices and deduct the exact Diamond cost for each purchase.
2. Update Spawner Stacking
- Maximum stack size: 20 spawners per placed block.
- Only spawners of the same type can stack together.
- Different spawner types cannot stack together.
- Each spawner provides 54 storage slots.
- One spawner provides 54 slots; 20 spawners provide 1,080 slots.
- Each inventory slot follows normal Minecraft stack limits: 64 items maximum, or the item's actual maximum if lower.
- Preserve spawner counts and stored items across server restarts and supported breaking or moving operations.
- Prevent duplication, item loss, and unauthorized access.
- Keep all existing production rates, storage buttons, and collection functionality unchanged.
3. Build and Test
- Modify the existing source project.
- Maintain compatibility with Minecraft Paper 1.21.11.
- Test all four spawner prices and stacking up to 20.
- Verify normal inventory stack limits and data persistence.
- Provide the updated ".jar" and modified source code if the build environment supports it.
Do not change any unrelated plugin features.
Update the four spawner prices in the shop and purchase handling.
Enforce same-type stacking up to 20 while preserving per-spawner storage, persistence, and existing collection behavior.
Check the resulting project for compatibility and summarize build/artifact availability.
Updated the existing Paper 1.21.11 project:
Spawner prices: Skeleton 120, Zombie 90, Creeper 105, Spider 60 Diamonds. The shop displays these config prices and charges the same amounts.
Stacking and storage: Default stack limit is now 20, and the code enforces a maximum of 20. Only matching spawner types can stack; storage remains 54 slots per spawner, up to 1,080 slots. Stored item capacity and collection respect each itemโs normal maximum stack size.
Persistence: Spawner stacks retain stored items and fractional production progress when stacked or broken and picked up. Existing production and collection behavior is preserved.
The platform checks compilation automatically after source changes, but I havenโt run these scenarios on a live server. On mobile, tap โฎ โ Compile Project โ Compile; after a successful build, tap Download to get the updated jar.
package com.kodari.allinone;
import org.bukkit.NamespacedKey;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;
public final class KodariAllInOne extends JavaPlugin {
private NamespacedKey itemIdKey;
private NamespacedKey modeKey;
private NamespacedKey spawnerItemKey;
private NamespacedKey spawnerDataKey;
private SpawnerManager spawners;
private BankManager bank;
private ShopManager shop;
private ToolManager tools;
@Override
public void onEnable() {
saveDefaultConfig();
itemIdKey = new NamespacedKey(this, "custom_item");
modeKey = new NamespacedKey(this, "pickaxe_mode");
spawnerItemKey = new NamespacedKey(this, "spawner_type");
spawnerDataKey = new NamespacedKey(this, "spawner_data");
bank = new BankManager(this);
spawners = new SpawnerManager(this);
shop = new ShopManager(this);
tools = new ToolManager(this);
getServer().getPluginManager().registerEvents(spawners, this);
getServer().getPluginManager().registerEvents(shop, this);
getServer().getPluginManager().registerEvents(tools, this);
getServer().getPluginManager().registerEvents(bank, this);
register("shop", shop);
register("sell", bank);
PluginCommand admin = getCommand("kadmin");
if (admin != null) admin.setExecutor(new AdminCommand(this));
}
@Override
public void onDisable() {
if (spawners != null) spawners.save();
if (bank != null) bank.save();
}
private void register(String name, org.bukkit.command.CommandExecutor executor) {
PluginCommand command = getCommand(name);
if (command != null) command.setExecutor(executor);
}
public NamespacedKey itemIdKey() { return itemIdKey; }
public NamespacedKey modeKey() { return modeKey; }
public NamespacedKey spawnerItemKey() { return spawnerItemKey; }
public NamespacedKey spawnerDataKey() { return spawnerDataKey; }
public SpawnerManager spawners() { return spawners; }
public BankManager bank() { return bank; }
public ShopManager shop() { return shop; }
public ToolManager tools() { return tools; }
}