dev-riyan

Plugin name hollow smp core and all details of plugin is in .txt

📎 1 file 8,103 chars
📄
pasted-code-1784579631645.txt
txt 94 lines
▶
**Product Requirements Document: Hollow SMP Core (Ultimate Edition)**
This is the definitive, exhaustive blueprint. Every single mechanic, command, and UI element is listed. The architecture relies on an asynchronous state machine. If a module is toggled off in the INVENTORY GUI, its event listeners unbind instantly. Zero idle RAM usage.
### 1. Core Architecture & INVENTORY GUI Engine
The entire plugin is managed via high-end, dark-themed, minimalist chest GUIs using elegant typography (Cinzel/Lora style where supported by resource packs) and clean glass dividers.
 * **Master Admin Panel (/hollow admin):** Dynamic toggle switches for every module below. Green glass for enabled, red for disabled.
 * **Module Manager & Settings Editor:** Click a module to view its config. Adjust integers (cooldowns, limits) live with +1, -1, +10, -10 buttons.
 * **Player Profile INVENTORY GUI (/profile):** Unified hub for players to view their stats, active jobs, and active bounties.
 * **Player Settings INVENTORY GUI (/settings):** Let players toggle personal UI stuff like scoreboard visibility, chat pings, and particle effects.
 * **Help INVENTORY GUI (/help):** Auto-generated, clickable command list based on the player's permission nodes.
 * **Performance Monitor (/smpcore debug):** Live UI showing RAM usage, TPS, and individual module tick times.
 * **Custom Developer API:** Built-in hooks for custom add-ons.
 * **Database:** Async SQLite (default) or MySQL.
### 2. Lifesteal & Custom Combat (lifesteal.enabled, combat.enabled)
The complete PvP and health management loop.
 * **Heart Stealing:** Gain hearts on kill, lose on death. Configurable min/max health caps.
 * **Heart Items & Crafting:** Custom recipes for physical hearts.
 * **Heart Bank INVENTORY GUI (/hearts):** Withdraw, deposit, or transfer health safely.
 * **Revive Altars:** Physical structures where players sacrifice rare loot to revive eliminated players.
 * **Join Kits:** One-time starter gear for fresh spawns.
 * **Spawn Grace:** Invincibility timer for new players joining the server.
 * **Anchor & Crystal Nerf:** Hard caps on explosion damage and radius for Respawn Anchors and End Crystals.
 * **Ender Pearl Cooldown:** Action-bar timer and global cooldowns.
 * **Gapple/Crapple Limiter:** Limits consumption rates and max stack sizes.
 * **Combat Logger:** Spawns a killable NPC if a player disconnects mid-fight.
 * **Immortal Items:** Custom NBT tags for specific gear that stays in inventory on death.
### 3. Claims & World Protection (claims.enabled, protection.enabled)
Anti-griefing and territory control.
 * **Chunk Claiming (/claim):** Claim chunks using a golden shovel or command.
 * **Claim Map INVENTORY GUI (/claimmap):** Visual chat or INVENTORY GUI map showing nearby claimed/unclaimed chunks.
 * **Claim Limits:** Configurable max claims per player based on rank.
 * **Trust System:** Add/remove members with specific container, door, or build permissions.
 * **Per-Claim PvP:** Owners can toggle PvP in their territory.
 * **World Guarding:** Global toggles to disable TNT/Creeper explosions, Enderman griefing, fire spread, and illegal block placements.
 * **Spawn Protection:** Hard-coded radius where only admins can build/interact.
### 4. Teleportation & Warps (teleport.enabled, warps.enabled)
Movement network with damage-cancel warmups.
 * **Base Commands:** /spawn, /setspawn, /home, /sethome, /delhome, /homes, /back.
 * **TPA System:** /tpa, /tpaccept, /tpdeny, /tpahere.
 * **RTP (/rtp):** Random teleport with safe-block algorithms (won't drop you in lava).
 * **Warp Network (/warp):** INVENTORY GUI with categories (Shops, PvP, Biomes) and custom item icons.
 * **Private Warps:** Players can set and rate player-made warps.
### 5. Economy & Jobs (economy.enabled)
Self-sustaining financial layer.
 * **Currency Base:** /balance, /pay, and /baltop.
 * **Jobs System:** Earn money by mining, woodcutting, or farming. Configurable payouts.
 * **Daily Rewards INVENTORY GUI:** Streak-based login bonuses.
 * **Server Sell INVENTORY GUI (/sellgui):** Drop items in a menu to instantly sell to the server.
 * **Auction House (/ah):** Player-to-player global marketplace with search and category filters.
 * **Secure Trade (/trade):** Dual-lock inventory INVENTORY GUI with a 3-second anti-scam countdown.
 * **Virtual Vaults (/pv):** Up to 54-slot personal storage tied to permissions.
### 6. Vanilla+ & Private QoL (utilities.enabled, qol.enabled)
Removing the grind.
 * **Utility Commands:** /heal, /feed, /repair, /fly, /god, /nightvision, /hat, /workbench, /ec.
 * **Multiplayer Sleep:** Percentage-based sleep to skip night or thunderstorms, with an action-bar countdown.
 * **Timber & Vein Miner:** Shift-break to mine entire ore veins or chop whole trees. Drains durability instantly.
 * **Fast Leaf Decay:** Leaves vanish instantly without logs.
 * **Sit & Crawl:** /sit anywhere, right-click stairs to sit, /crawl to enter 1x1 gaps.
 * **Armor Stand Editor:** INVENTORY GUI tool to pose stands, toggle arms, and hide baseplates.
 * **Waypoints:** INVENTORY GUI for saving coords. Can act as a compass pointer or direct teleport.
 * **Crafting Tweaks:** Unpackable quartz, universal dyeing, craftable invisible item frames.
 * **Voice Chat:** Hook for the Simple Voice Chat proximity mod.
 * **Item Limits:** Hard caps per chunk for lag-inducing blocks (e.g., hoppers).
### 7. Chat, Teams & Socials (chat.enabled, teams.enabled)
 * **Chat Formatting:** Custom prefix/suffix layouts, hex color support.
 * **Channels:** Local (proximity) and Global chat toggles.
 * **Chat Filters:** Anti-spam cooldowns, anti-caps enforcement, and blocked-word filters.
 * **Mentions:** Sound notifications and highlighting when a player's name is typed.
 * **Teams System (/team):** Create alliances. Includes private team chat, friendly-fire toggles, and shared team homes.
### 8. Death & Bounties (death.enabled, bounty.enabled)
 * **Player Graves:** Spawns a locked physical gravestone or chest holding gear on death.
 * **Death Coords & Messages:** Custom hoverable death messages in chat, plus coords sent privately to the dead player.
 * **Keep Inventory:** Toggleable per-world or per-rank.
 * **Bounty Board (/bounty):** Place money hits on enemies. Includes a top bounty hunter leaderboard INVENTORY GUI.
### 9. Moderation & Anti-Exploit (moderation.enabled, security.enabled)
 * **Staff Suite:** /vanish (silent cloak), /invsee (edit player inventory), /ecsee (edit ender chest).
 * **Sanctions:** /kick, /ban, /tempban, /mute, /warn, /jail. Includes a screen-darkening freeze INVENTORY GUI for suspect players.
 * **Anti-Seed Cracking:** Obfuscates chunks to break client-side seed mapping (Requires ProtocolLib).
 * **Anti-Health Indicator:** Sends fake health packets to clients to break radar mods.
 * **Illegal Scrubber:** Auto-deletes 32k enchantments, glitched stacked totems, and bedrock.
 * **Dupe Patching:** Live blocks for donkey, shulker, and portal dupes.
 * **Redstone Limiter:** Stops high-frequency lag machines.
 * **Alt Detection:** Flags matching IPs in the staff chat on join.
### 10. Events & Cosmetics (events.enabled, cosmetics.enabled)
 * **Random Events:** Scheduled meteor crashes, treasure drops, and supply crates.
 * **Global Modifiers:** Triggerable Blood Moons (harder mobs, better loot) and Double XP weekends.
 * **Cosmetics:** Join/leave effects, cosmetic particle trails, screen titles on major events, custom nicknames (/nick), and player outline glowing (/glow).
### 11. Data Analytics & Third-Party Hooks (stats.enabled)
 * **Tracked Stats:** Playtime, kills, deaths, K/D ratio, blocks broken, first join, last seen. All exposed to external APIs.
 * **PlaceholderAPI:** Full %hollow_stats_kills% support for scoreboards.
 * **LuckPerms:** Direct integration for dynamic rank-based limits.
 * **Vault:** Syncs internal economy with external plugins if needed.
 * **Map Integration:** Hooks for BlueMap and Dynmap to show claims and player locations.
 * **DiscordSRV:** Bridges the in-game chat, death messages, and admin logs to a Discord server.
Kodari AI
KodariJul 20 at 8:36 pm 15
HollowSmpCore
Hollow SMP Core provides a modular foundation for a feature-rich survival server. It includes a live-toggle admin panel, player profile and settings menus, permission-aware help, performance diagnostics, module lifecycle management, and tracked player statistics. The architecture is built to expand into lifesteal, claims, teleports, economy, moderation, events, social systems, and external integrations while allowing inactive modules to remain unloaded.
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
19 898
src/main/java/com/hollowsmp/core/HollowSmpCore.java
package com.hollowsmp.core;

import com.hollowsmp.core.command.HollowCommand;
import com.hollowsmp.core.gui.MenuListener;
import com.hollowsmp.core.gui.MenuService;
import com.hollowsmp.core.module.ModuleManager;
import com.hollowsmp.core.settings.PlayerSettingsStore;
import com.hollowsmp.core.stats.StatsModule;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

public final class HollowSmpCore extends JavaPlugin {
    private ModuleManager moduleManager;
    private MenuService menuService;
    private PlayerSettingsStore playerSettingsStore;

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

        this.playerSettingsStore = new PlayerSettingsStore();
        this.moduleManager = new ModuleManager(this);
        this.moduleManager.loadModules();

        StatsModule statsModule = this.moduleManager.getStatsModule();
        this.menuService = new MenuService(this.moduleManager, statsModule, this.playerSettingsStore);
        getServer().getPluginManager().registerEvents(new MenuListener(this.menuService), this);

        HollowCommand command = new HollowCommand(this.menuService);
        registerCommand("hollow", command);
        registerCommand("smpcore", command);
        registerCommand("profile", command);
        registerCommand("settings", command);
        registerCommand("help", command);
    }

    @Override
    public void onDisable() {
        if (this.moduleManager != null) {
            this.moduleManager.disableAll();
        }
    }

    private void registerCommand(String name, HollowCommand executor) {
        PluginCommand command = getCommand(name);
        if (command == null) {
            throw new IllegalStateException("Missing command definition for " + name);
        }

        command.setExecutor(executor);
    }
}