Build the requested Morales’s SMPCore as a real Java Paper plugin in this project. This task is self-contained; the user’s full requirements are summarized here and are binding:

IDENTITY/BUILD: plugin display name “Morales’s SMPCore”, main command /smpcore, owner account name moralesyo_, Java/Paper with Maven (use this template’s supported versions; inspect existing project/template first). Default SQLite, optional MySQL only if implemented robustly. Purple/dark-purple/black owner GUI. Produce source, configs, docs, and tests where practical. Do not build/compile (the workspace verifier does that).

CRITICAL SECURITY: Owner means the UUID explicitly configured for the account moralesyo_, never a username check. Do not invent or silently trust a UUID, first joiner, OP, permissions, GUI title, or command argument. Default owner UUID is unset; fail closed. Include a safe enrollment guide and a console-only setup/enrollment path requiring the server operator to obtain and explicitly enter the official UUID (offline-mode identity caveat). At every owner command, GUI open/click, and privileged service action, independently check UUID. OP/wildcard/staff permissions never confer owner status. Log unauthorized attempts without secrets. /smpcore opme must default disabled until verified setup is complete, be in-game owner only, accept no target, grant OP only to that caller if not already OP, report accurately, log success/rejection, never provide another OP/backdoor command.

CONFIG/REGISTRY: YAML defaults, clear config files (config.yml, features.yml, messages.yml, gui.yml, database.yml, protected owner config if appropriate). Every genuinely implemented independently useful feature has a unique feature ID, category/name/description, its own enabled toggle, detailed relevant settings, real runtime status, safe init/disable cleanup, GUI status, docs and tests where feasible. Registry must drive status/features report, GUI, config validation and runtime toggles. Never pad feature counts, represent decorative toggles as functional, or claim unimplemented items are implemented. If the full aspirational 180 feature list cannot honestly be completed, implement a sound functional subset, report exact implemented/registered count and explicitly list incomplete features. No placeholders/stubs pretending to function. Preserve data when a feature is disabled; runtime re-enable must not duplicate tasks/listeners. Make independently switchable features truly independent (e.g. tracking versus rewards).

FUNCTIONAL SCOPE: User requested 180 SMP capabilities across: core/admin/config diagnostics; player information, playtime, join/quit, stats/preferences; spawn/homes/warps/back/RTP/TPA, warmups/cancellation/safety; SQLite economy/transfers; reward claims/daily/playtime; player warps/social/private messages/ignore; permissioned moderation and audit; rate limiting/protection; custom items/recipes; PvP/stats/scoreboards/tab; per-world management/maintenance/performance/database diagnostics. Build maintainable modular architecture and a useful real subset rather than a monolith. At minimum prioritize secure core, owner-only functional GUI with real feature toggles/settings/status, configuration validation/reload/status/features, player-safe spawn/home/warp/teleport basics with safe storage, player playtime/stats, and sound owner security. Add other modules only when implemented end to end. Include sensible permission nodes, tab completion, input validation, configurable messages, and disabled-feature responses. Main menu can organize available categories; do not imply unsupported modules exist.

DATA/PERFORMANCE: UUID-based persistence, prepared SQL if SQL used, schema initialization/versioning if feasible, no passwords in logs, no blocking DB work on main thread where suitable, safe shutdown/reload and failure handling. Paper API on correct thread; cancel owned tasks/listeners safely. Optional integrations cannot prevent startup.

DELIVERABLES: README with supported Paper/Java versions, setup/install, UUID enrollment and offline-mode warning, commands/permissions, settings, accurate feature registry/implementation and incomplete lists, known limitations. Add automated tests for owner UUID fail-closed/mismatch/username-spoof and opme authorization where feasible, registry/config toggles, persistence; distinguish unrun tests. Ensure plugin metadata and default configuration are valid. Create real implementation, not just a plan. When finished report files/modules, exact accurate counts, implementation limitations and tests (do not claim build success).

Kodari AI
KodariOct 17 at 1:59 am 5
SMPCore
Morales's SMPCore is a comprehensive Paper plugin delivering secure owner-only administration, player utilities, and server management. Features include UUID-based owner authentication with fail-closed security, configurable feature registry with independent toggles, player homes/warps/teleportation with safety checks, playtime tracking, SQLite persistence, and an owner GUI for runtime management. Implements permissioned commands, tab completion, configurable messages, and automated tests for security-critical paths.
  1. Inspect the project template and supported Java/Paper/Maven versions.

  2. Build the secure plugin core and a truthful, functional feature subset.

  3. Add configuration, enrollment/setup documentation, and practical tests.

Created a Maven-based Paper plugin targeting Java 21 and Paper 1.21.4.

  • Owner security: Enrollment is console-only and requires an explicitly entered UUID; ownership never depends on username, OP status, or permissions. /smpcore opme is opt-in, owner-only, and accepts no target. GUI actions, feature toggles, and config reloads independently check the enrolled UUID.

  • Implemented registry: Exactly 5 features: core diagnostics, player statistics, homes, spawn/server warps, and teleport requests. Each has an enabled toggle, runtime status, and lifecycle handling.

  • Persistence and UI: SQLite stores UUID-based statistics and homes asynchronously; YAML stores warps and spawn. Added the owner feature-toggle GUI, configuration/messages, plugin metadata, README, and tests for owner authorization, registry toggles, and SQLite persistence.

  • Limitations: The README identifies the unimplemented portions of the broader requested scope. MySQL is not implemented.

  • Verification: Tests are included but have not been run; no build success is claimed.

The workspace compile just failed with 27 errors because JUnit 5 is unavailable to its compile pass. Representative errors: src/main/java/test/java/com/morales/smpcore/OwnerSecurityTest.java:3: package org.junit.jupiter.api does not exist, same for SqliteStoreTest.java and FeatureRegistryTest.java, including missing @Test, @TempDir, and assertion symbols. I inspected pom.xml: it declares junit-jupiter 5.11.4 with test scope and standard Maven compiler/surefire; the test files are currently under src/test/java. Fix the build/layout so production plugin compilation performed by the workspace succeeds while preserving tests if feasible (do not fake test success; if verifier indiscriminately compiles all Java files, relocate or restructure tests outside its production Java source scan and document how Maven tests run). Do not alter owner security behavior or silently remove functional production code. Do not build; workspace will recompile after your changes. Report exact changes.

Kodari AI
KodariOct 17 at 2:01 am 1
  • Moved all three JUnit tests from src/test/java to maven-tests/java, outside the production source tree.

  • Set Maven’s testSourceDirectory to maven-tests/java and documented that mvn test compiles and runs the JUnit 5 tests.

  • Left production code and owner-security behavior unchanged. I did not build or claim test success.

Kodari can make mistakes. Review important code before using.
Files
maven-tests
src
manifest.kod
pom.xml
README.md
Code
22 2,012
src/main/java/com/morales/smpcore/SmpCorePlugin.java
package com.morales.smpcore;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.command.CommandSender;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.IllegalPluginAccessException;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public final class SmpCorePlugin extends JavaPlugin {
    private OwnerSecurity ownerSecurity;
    private SqliteStore store;
    private FeatureRegistry featureRegistry;
    private PlayerStatsFeature playerStatsFeature;
    private TeleportRequestsFeature teleportRequestsFeature;
    private OwnerGui ownerGui;
    private YamlConfiguration messages;
    private YamlConfiguration guiConfig;
    private YamlConfiguration databaseConfig;
    private YamlConfiguration warps;
    private String databaseFileName;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        for (String resource : List.of("features.yml", "messages.yml", "gui.yml", "database.yml", "owner.yml", "warps.yml")) {
            saveBundledIfMissing(resource);
        }
        messages = loadYaml("messages.yml");
        guiConfig = loadYaml("gui.yml");
        databaseConfig = loadYaml("database.yml");
        warps = loadYaml("warps.yml");
        if (!"sqlite".equalsIgnoreCase(databaseConfig.getString("type", "sqlite"))) {
            getLogger().severe("Only SQLite is implemented. Set database.yml type to sqlite.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        databaseFileName = databaseConfig.getString("file", "smpcore.db");
        if (databaseFileName == null || databaseFileName.isBlank()) {
            getLogger().severe("database.yml file must be a non-empty SQLite file name.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        try {
            ownerSecurity = new OwnerSecurity(new File(getDataFolder(), "owner.yml"));
        } catch (IOException exception) {
            getLogger().severe("Could not load owner.yml; owner-protected actions will not be available.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        store = new SqliteStore(new File(getDataFolder(), databaseFileName));
        store.ready().whenComplete((ignored, failure) -> {
            if (failure != null && isEnabled()) {
                logDatabaseFailure("opening the SQLite database");
            } else if (failure == null && isEnabled()) {
                getLogger().info("SQLite database initialized.");
            }
        });

        featureRegistry = new FeatureRegistry(new File(getDataFolder(), "features.yml"), getLogger(), ownerSecurity);
        playerStatsFeature = new PlayerStatsFeature(this, store);
        teleportRequestsFeature = new TeleportRequestsFeature(this);
        featureRegistry.register("core_diagnostics", "Core", "Core diagnostics",
                "Feature status and configuration validation reports.", "BOOK", Map.of(), () -> { }, () -> { });
        featureRegistry.register("player_stats", "Players", "Player statistics",
                "UUID-based playtime, kills, deaths, and player statistics.", "CLOCK",
                Map.of("autosave-seconds", new FeatureRegistry.IntSetting(300, 30, 3600)),
                playerStatsFeature::enable, playerStatsFeature::disable);
        featureRegistry.register("homes", "Travel", "Player homes",
                "Persistent UUID-owned homes with limits and destination safety checks.", "OAK_DOOR",
                Map.of("max-homes", new FeatureRegistry.IntSetting(3, 1, 25)), () -> { }, () -> { });
        featureRegistry.register("spawn_warps", "Travel", "Spawn and server warps",
                "Safe server spawn and named server warp management.", "COMPASS",
                Map.of("max-warps", new FeatureRegistry.IntSetting(20, 1, 100)), () -> { }, () -> { });
        featureRegistry.register("teleport_requests", "Travel", "Teleport requests",
                "Expiring player-to-player teleport requests with quit cleanup.", "ENDER_PEARL",
                Map.of("request-timeout-seconds", new FeatureRegistry.IntSetting(60, 10, 300)),
                teleportRequestsFeature::enable, teleportRequestsFeature::disable);
        featureRegistry.reloadFromDisk();

        ownerGui = new OwnerGui(this);
        Bukkit.getPluginManager().registerEvents(ownerGui, this);
        SmpCoreCommand command = new SmpCoreCommand(this);
        if (getCommand("smpcore") == null) {
            getLogger().severe("plugin.yml does not declare the smpcore command.");
            Bukkit.getPluginManager().disablePlugin(this);
            return;
        }
        getCommand("smpcore").setExecutor(command);
        getCommand("smpcore").setTabCompleter(command);
        getLogger().info("Morales's SMPCore enabled with " + featureRegistry.all().size() + " registered features.");
    }

    @Override
    public void onDisable() {
        if (featureRegistry != null) {
            featureRegistry.disableAll();
        }
        if (store != null) {
            store.close();
        }
    }

    public OwnerSecurity getOwnerSecurity() {
        return ownerSecurity;
    }

    public SqliteStore getStore() {
        return store;
    }

    public FeatureRegistry getFeatureRegistry() {
        return featureRegistry;
    }

    public TeleportRequestsFeature getTeleportRequestsFeature() {
        return teleportRequestsFeature;
    }

    public OwnerGui getOwnerGui() {
        return ownerGui;
    }

    public YamlConfiguration getGuiConfig() {
        return guiConfig;
    }

    public YamlConfiguration getWarps() {
        return warps;
    }

    public void send(CommandSender sender, String key, String... replacements) {
        String text = messages.getString(key, "&cMissing message: " + key);
        for (int i = 0; i + 1 < replacements.length; i += 2) {
            text = text.replace("%" + replacements[i] + "%", replacements[i + 1]);
        }
        String prefix = messages.getString("prefix", "");
        sender.sendMessage(colorize(prefix + text));
    }

    public String colorize(String text) {
        return ChatColor.translateAlternateColorCodes('&', text);
    }

    public boolean isSafeLocation(Location location) {
        if (location.getWorld() == null) {
            return false;
        }
        Location feet = location.clone();
        feet.setY(Math.floor(location.getY()));
        return feet.getBlock().isPassable()
                && feet.clone().add(0, 1, 0).getBlock().isPassable()
                && feet.clone().subtract(0, 1, 0).getBlock().isSolid();
    }

    public Location loadLocation(String path) {
        String worldName = warps.getString(path + ".world");
        if (worldName == null) {
            return null;
        }
        World world = Bukkit.getWorld(worldName);
        if (world == null) {
            return null;
        }
        return new Location(world, warps.getDouble(path + ".x"), warps.getDouble(path + ".y"),
                warps.getDouble(path + ".z"), (float) warps.getDouble(path + ".yaw"),
                (float) warps.getDouble(path + ".pitch"));
    }

    public void saveLocation(String path, Location location) {
        warps.set(path + ".world", location.getWorld().getName());
        warps.set(path + ".x", location.getX());
        warps.set(path + ".y", location.getY());
        warps.set(path + ".z", location.getZ());
        warps.set(path + ".yaw", location.getYaw());
        warps.set(path + ".pitch", location.getPitch());
    }

    public boolean saveWarps() {
        try {
            warps.save(new File(getDataFolder(), "warps.yml"));
            return true;
        } catch (IOException exception) {
            getLogger().warning("Could not save warps.yml.");
            return false;
        }
    }

    public List<String> validateConfiguration() {
        List<String> issues = new ArrayList<>(featureRegistry.validateConfiguration());
        if (!"sqlite".equalsIgnoreCase(databaseConfig.getString("type", ""))) {
            issues.add("database.yml type must be sqlite; MySQL is not implemented.");