Hhgc Vvhj

Create me plugin like DonutSMP

Kodari AI
KodariSep 15 at 1:52 pm 2
DonutSMPCore
DonutSMPCore is a comprehensive Minecraft plugin designed for the DonutSMP server experience. It provides essential survival multiplayer features including player homes with multiple set locations, warp points for server navigation, a balanced economy system with virtual currency, and a player-to-player trading interface. The plugin includes a robust permission system using Vault for economy integration, configurable messages through a YAML configuration file, and a command system covering /home, /sethome, /warp, /balance, /pay, and /trade. It also features a death chest system that preserves player inventory on death, a spawn protection mechanism, and an anti-grief system with configurable claim blocks. All features are fully configurable through config.yml, allowing server administrators to customize costs, cooldowns, and enabled features without code modifications.
  1. Core plugin setup: Gradle project, plugin metadata, and configuration.

  2. Economy persistence: balances, payments, balance leaderboard, and player lifecycle saving.

  3. Survival features: configurable shop GUI, selling, homes, spawn, and commands.

  4. Registration: listeners, command routing, tab completion, and clean shutdown persistence.

Created a DonutSMP-inspired Paper plugin core with:

  • Persistent player economy and balances

  • /balance, /pay, /baltop

  • Configurable GUI shop

  • Buy/sell system with /shop and /sell

  • Persistent homes with /sethome and /home

  • Spawn management with /spawn and /setspawn

  • Donut-style command aliases and tab completion

  • YAML player and home data storage

  • XSeries cross-version material support

  • Gradle setup targeting Paper 1.21.4 Java 21

Hhgc Vvhj

Show me shop

Kodari AI
KodariSep 15 at 1:54 pm 1

Use:

Plain Text
/shop

It opens the Donut Shop GUI:

Item
Bundle
Buy
Sell
Diamond
1
$500
$250
Emerald
1
$350
$175
Iron Ingot
16
$160
$80
Gold Ingot
16
$240
$120
Coal
16
$80
$40
Bread
16
$48
$24
  • Left-click an item to buy it.

  • Right-click an item to sell one bundle.

  • /sell sells as many complete bundles as possible from the item in your main hand.

  • Shop title: Donut Shop

  • Starting balance: $1,000

Hhgc Vvhj

Add more items in shop and show me

Kodari AI
KodariSep 15 at 1:57 pm 1
  1. Shop expansion: add more configurable resource, farming, food, and utility items.

  2. Shop display: summarize the updated /shop catalog and controls.

Added 18 more items to /shop. The shop now contains:

Blocks and resources

Item
Bundle
Buy
Sell
Diamond
1
$500
$250
Emerald
1
$350
$175
Iron Ingot
16
$160
$80
Gold Ingot
16
$240
$120
Coal
16
$80
$40
Cobblestone
32
$64
$32
Stone
32
$96
$48
Dirt
32
$32
$16
Oak Log
16
$80
$40
Sand
32
$96
$48
Gravel
32
$80
$40
Obsidian
4
$400
$200
Lapis Lazuli
16
$160
$80
Redstone
16
$128
$64
Nether Quartz
16
$240
$120

Farming and food

Item
Bundle
Buy
Sell
Bread
16
$48
$24
Wheat
16
$64
$32
Carrot
16
$80
$40
Potato
16
$80
$40
Apple
8
$80
$40
Steak
8
$96
$48

Mob drops

Item
Bundle
Buy
Sell
String
16
$128
$64
Gunpowder
8
$160
$80
Slimeball
4
$200
$100
Ender Pearl
4
$320
$160

Use:

Plain Text
/shop
  • Left-click: buy one bundle

  • Right-click: sell one bundle

  • /sell: sell all complete bundles of the item in your main hand

Restart the server after updating the configuration so the new shop items load.

Hhgc Vvhj

Add pvp gears a very block a very resources a very in shop and show me

Kodari AI
KodariSep 15 at 2:00 pm 1
  1. Shop expansion: add PvP gear, combat supplies, building blocks, and additional resources to the configurable catalog.

  2. Shop display: list the new /shop sections, prices, bundle sizes, and controls.

Added 20 new items to /shop. The shop now uses all 45 available item slots.

PvP gear

Item
Bundle
Buy
Sell
Diamond Sword
1
$1,800
$900
Diamond Helmet
1
$1,400
$700
Diamond Chestplate
1
$2,200
$1,100
Diamond Leggings
1
$2,000
$1,000
Diamond Boots
1
$1,200
$600
Iron Sword
1
$450
$225
Bow
1
$500
$250
Arrows
16
$160
$80
Shield
1
$600
$300
Golden Apple
1
$900
$450

Building blocks

Item
Bundle
Buy
Sell
Oak Planks
32
$96
$48
Glass
32
$160
$80
Bricks
32
$320
$160
Deepslate
32
$160
$80
Netherrack
32
$128
$64
End Stone
32
$320
$160

Extra resources

Item
Bundle
Buy
Sell
Blaze Rod
4
$400
$200
Magma Cream
4
$320
$160
Leather
16
$160
$80
Feather
16
$96
$48

Use:

Plain Text
/shop
  • Left-click an item: buy

  • Right-click an item: sell

  • /sell: sell complete bundles from your main hand

Restart the server so the updated shop configuration loads.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
14 1,152
src/main/java/com/kodari/donutsmp/DonutSMPPlugin.java
package com.kodari.donutsmp;

import com.kodari.donutsmp.command.DonutCommand;
import com.kodari.donutsmp.economy.EconomyManager;
import com.kodari.donutsmp.home.HomeManager;
import com.kodari.donutsmp.shop.ShopManager;
import com.kodari.donutsmp.storage.PlayerDataStore;
import org.bukkit.ChatColor;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class DonutSMPPlugin extends JavaPlugin {
    private PlayerDataStore playerDataStore;
    private EconomyManager economyManager;
    private HomeManager homeManager;
    private ShopManager shopManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        playerDataStore = new PlayerDataStore(this);
        economyManager = new EconomyManager(playerDataStore);
        homeManager = new HomeManager(this);
        shopManager = new ShopManager(this, economyManager);

        DonutCommand command = new DonutCommand(this);
        registerCommand("donut", command);
        registerCommand("balance", command);
        registerCommand("pay", command);
        registerCommand("baltop", command);
        registerCommand("shop", command);
        registerCommand("sell", command);
        registerCommand("sethome", command);
        registerCommand("home", command);
        registerCommand("spawn", command);
        registerCommand("setspawn", command);

        getServer().getPluginManager().registerEvents(new DonutListener(this), this);
        getLogger().info("DonutSMP core enabled.");
    }

    @Override
    public void onDisable() {
        if (playerDataStore != null) {
            playerDataStore.saveAll();
        }
        if (homeManager != null) {
            homeManager.save();
        }
    }

    private void registerCommand(String name, DonutCommand executor) {
        PluginCommand command = getCommand(name);
        if (command != null) {
            command.setExecutor(executor);
            command.setTabCompleter(executor);
        }
    }

    public PlayerDataStore getPlayerDataStore() {
        return playerDataStore;
    }

    public EconomyManager getEconomyManager() {
        return economyManager;
    }

    public HomeManager getHomeManager() {
        return homeManager;
    }

    public ShopManager getShopManager() {
        return shopManager;
    }

    public String color(String message) {
        return ChatColor.translateAlternateColorCodes('&', message);
    }

    public String prefix() {
        return color("&8[&6Donut&8] ");
    }
}