Bababoy Tokyo

Can you make me a donutsmpcore plugin with all in one plugin

Kodari AI
KodariSep 17 at 1:49 pm 2
DonutSMPSuite
A comprehensive all-in-one Minecraft plugin for DonutSMP servers. Provides essential server management features including player homes with multiple location support, warp points for public teleportation, a balanced economy system with currency management, player-to-player payment transactions, a user-friendly GUI-based shop system for buying and selling items, and an admin toolkit with moderation commands. Includes configurable messages, permission-based access control, and a persistent data storage system using YAML files. Designed to streamline server administration while enhancing player experience through intuitive commands and interactive menus, all packaged into a single cohesive plugin solution.
  1. Core foundation: Gradle build, plugin metadata, configuration, and lifecycle wiring.

  2. Player data: persistent balances and named homes stored in YAML.

  3. Gameplay commands: spawn, RTP, economy, homes, messaging, moderation utilities, and nearby-player lookup.

  4. Runtime services: safe random teleportation and join initialization.

Created DonutSMPCore with:

  • Persistent player data and balances

  • /balance, /pay, /baltop

  • /spawn, /setspawn

  • /home, /sethome, /delhome, /homes

  • Safe random teleport with cooldown

  • Private messaging with /msg and /reply

  • /fly, /heal, /feed

  • /enderchest, /workbench, /near

  • YAML persistence in players.yml

  • Admin permission: donutsmp.admin

  • Paper 1.21.4 Gradle setup

  • Configurable starting balance, RTP radius, RTP cooldown, and nearby-player radius

This provides the core foundation for a DonutSMP server; larger systems such as claims, auctions, crates, kits, quests, ranks, and custom GUIs can be added on top.

Bababoy Tokyo

Add 10 more in commands like settings, afk and tools, and crates add tab and scoreboard and 10 holograms make it for 1.8x - 26x

Kodari AI
KodariSep 17 at 2:01 pm 5
  1. Add 10 utility commands, including settings, AFK, and player tools.

  2. Add a configurable crate system with keys, previews, and rewards.

  3. Add tab-list and scoreboard presentation.

  4. Add 10 configurable holograms and harden compatibility across supported versions.

Task 1 implementation:

  • Add persistent player settings and AFK state.

  • Add 10 commands: /settings, /afk, /hat, /trash, /repair, /ping, /playtime, /rules, /suicide, and /tool.

  • Track AFK activity on join, quit, movement, chat, and command use.

  1. Crate implementation:

  • Add persistent crate-key balances.

  • Add configurable weighted rewards.

  • Add /crates, /crates open, /crates preview, /crates keys, and admin key distribution.

  • Add crate tab completion and a protected preview GUI.

  1. Presentation implementation:

  • Add a live sidebar scoreboard with balance, online count, AFK state, and crate keys.

  • Add a live tab header/footer and AFK-aware player list names.

  • Respect the persisted settings scoreboard and settings tab toggles.

  • Refresh both displays on a lightweight repeating task.

  1. Hologram implementation:

  • Add a native, dependency-free ArmorStand hologram manager.

  • Load 10 named holograms from config.

  • Support multiple lines per hologram, color codes, reload-safe cleanup, and cleanup on plugin disable.

  1. Compatibility pass: replace modern Java/API assumptions with legacy-safe code paths and add reflective fallbacks where APIs differ, while keeping one plugin artifact for the supported range.

  1. Added 10 commands:

    • /settings

    • /afk

    • /hat

    • /trash

    • /repair

    • /ping

    • /playtime

    • /rules

    • /suicide

    • /tool

  2. Added persistent settings, AFK tracking, AFK activity detection, server rules, utility tools, and player ping compatibility through reflection.

  3. Added crate system:

    • /crates

    • /crates open <crate>

    • /crates preview <crate>

    • /crates keys

    • /crates key <player> <crate> [amount]

    • Weighted configurable rewards

    • Persistent crate keys

    • Protected preview GUI

    • Crate tab completion

  4. Added live tab and scoreboard:

    • Balance

    • Online player count

    • Crate key count

    • AFK status

    • AFK player list prefix

    • /settings scoreboard on|off

    • /settings tab on|off

  5. Added 10 configurable holograms using ArmorStands. Locations and text can be edited in config.yml.

  6. Added compatibility changes:

    • Java 8 bytecode target

    • Spigot 1.8.8 API baseline

    • Removed api-version: 1.21

    • Removed Java 9+ collections and modern switch syntax

    • Added legacy-safe ping and tab fallbacks

    • Avoided modern-only item APIs

Minecraft 1.26 does not currently exist as a released API, but the plugin is built against a legacy-compatible API baseline so it can run across 1.8.x through modern versions as long as those versions preserve the Bukkit compatibility layer.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
19 1,814
src/main/java/com/kodari/donutsmpcore/DonutSMPCore.java
package com.kodari.donutsmpcore;

import com.kodari.donutsmpcore.command.CoreCommand;
import com.kodari.donutsmpcore.data.PlayerDataManager;
import com.kodari.donutsmpcore.listener.PlayerListener;
import com.kodari.donutsmpcore.listener.CrateListener;
import com.kodari.donutsmpcore.service.CrateManager;
import com.kodari.donutsmpcore.service.HudManager;
import com.kodari.donutsmpcore.service.HologramManager;
import com.kodari.donutsmpcore.service.SpawnManager;
import com.kodari.donutsmpcore.service.AfkManager;
import com.kodari.donutsmpcore.service.TeleportManager;
import java.util.Arrays;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class DonutSMPCore extends JavaPlugin {

    private PlayerDataManager playerDataManager;
    private SpawnManager spawnManager;
    private TeleportManager teleportManager;
    private AfkManager afkManager;
    private HologramManager hologramManager;

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

        playerDataManager = new PlayerDataManager(this);
        playerDataManager.load();
        spawnManager = new SpawnManager(this);
        teleportManager = new TeleportManager(this);
        afkManager = new AfkManager(playerDataManager);
        CrateManager crateManager = new CrateManager(this, playerDataManager);
        HudManager hudManager = new HudManager(playerDataManager, afkManager, crateManager);
        hologramManager = new HologramManager(this);
        hologramManager.spawnAll();

        CoreCommand coreCommand = new CoreCommand(this, playerDataManager, spawnManager, teleportManager, afkManager, crateManager);
        Arrays.asList("donut", "spawn", "setspawn", "balance", "pay", "baltop", "home", "sethome",
                "delhome", "homes", "rtp", "msg", "reply", "fly", "heal", "feed", "enderchest",
                "workbench", "near", "settings", "afk", "hat", "trash", "repair", "ping", "playtime",
                "rules", "suicide", "tool", "crates").forEach(name -> {
            PluginCommand command = getCommand(name);
            if (command != null) {
                command.setExecutor(coreCommand);
                command.setTabCompleter(coreCommand);
            }
        });

        getServer().getPluginManager().registerEvents(new PlayerListener(playerDataManager, afkManager), this);
        getServer().getPluginManager().registerEvents(new CrateListener(), this);
        getServer().getScheduler().runTaskTimer(this, hudManager::updateAll, 20L, 20L);
        getServer().getScheduler().runTaskTimer(this, playerDataManager::save, 6000L, 6000L);
        getLogger().info("DonutSMPCore enabled.");
    }

    @Override
    public void onDisable() {
        if (playerDataManager != null) {
            playerDataManager.save();
        }
        if (hologramManager != null) {
            hologramManager.removeAll();
        }
    }

    public PlayerDataManager getPlayerDataManager() {
        return playerDataManager;
    }

    public SpawnManager getSpawnManager() {
        return spawnManager;
    }

    public TeleportManager getTeleportManager() {
        return teleportManager;
    }
}