lithiumyt

Create a Minecraft Paper 1.21+ plugin called GhostBound SMP.

Core Concept

GhostBound SMP is a survival plugin centered around two permanent societies:

  1. Humans Society (The Living)
  2. Ghost Society (The Dead)

When a player dies, they automatically leave the Human Society and join the Ghost Society. Death is not the end of gameplay. Instead, players enter a new phase with unique abilities and objectives.

Human Society

All alive players are members of the Human Society.

Abilities:

  • Build and claim settlements.
  • Create towns and bases.
  • Trade resources.
  • Perform revival rituals.
  • Access Human Society chat.
  • Defend Ghost Altars.

Commands:

  • /human info
  • /human chat
  • /human members

Ghost Society

When a player dies, they become a Ghost.

Ghost Features:

  • Semi-transparent appearance.
  • Slow flight.
  • Cannot break or place blocks.
  • Cannot damage humans.
  • Separate Ghost Chat.
  • Custom ghost inventory.
  • Can pass through Spectral Blocks.

Commands:

  • /ghost status
  • /gchat
  • /haunt
  • /spectralvision
  • /phasewalk

Ghost Abilities:

Haunt:

  • Play spooky sounds near living players.

Spectral Vision:

  • Reveal hidden chests.
  • Reveal secret passages.
  • Reveal ancient ruins.

Phase Walk:

  • Temporarily move through Spectral Blocks.

Spirit Fragments

Create a custom item called Spirit Fragment.

Sources:

  • Ancient Ruins
  • Dungeon Chests
  • Boss Mobs
  • Blood Moon Events

Uses:

  • Reviving Ghosts
  • Activating Ghost Altars
  • Special server events

Revival System

Create a structure called Ghost Altar.

Requirements:

  • 10 Spirit Fragments
  • 1 Nether Star

Process:

  • Humans perform a 10-second ritual.
  • Play particles and sounds.
  • Ghost returns to the Human Society.

Commands:

  • /ghost revive <player>
  • /ghostaltar create

Blood Moon Event

Occurs every 7 Minecraft days.

Effects:

  • Global announcement.
  • Increased hostile mob spawns.
  • Increased Spirit Fragment drops.
  • Dark atmosphere.
  • Optional red sky effect.

Ancient Ruins

Generate structures randomly around the world.

Features:

  • Lore books.
  • Hidden treasure.
  • Spirit Fragments.
  • Ghost-only areas.
  • Human-only areas.

Players must cooperate to fully explore ruins.

Society Cooperation

Humans and Ghosts are not enemies.

Design gameplay around cooperation:

  • Ghosts locate secrets.
  • Humans collect resources.
  • Humans revive Ghosts.
  • Ghosts help Humans find rare loot.
  • Both societies work together during Blood Moons.

Database

Store:

  • Ghost status
  • Death count
  • Revival history
  • Spirit Fragment data
  • Altar locations

Use SQLite by default.

Configuration

Configurable:

  • Revival costs
  • Blood Moon frequency
  • Fragment drop rates
  • Flight speed
  • Messages
  • Sounds
  • Cooldowns

Permissions

ghostbound.admin ghostbound.ghost ghostbound.revive

Compatibility

  • Paper 1.21+
  • PlaceholderAPI support
  • DiscordSRV integration
  • Optimized for private SMPs with 5-50 players

Theme

Dark fantasy, mysterious, atmospheric, and story-driven.

Tagline: "Two Societies. One World. Death Is Only The Beginning."

Kodari AI
KodariJun 4 at 3:48 am 171
GhostBoundSMP
A dark fantasy SMP plugin built around two permanent societies: the Living (Humans) and the Dead (Ghosts). When players die they transition to the Ghost Society gaining flight, spectral vision, haunt, and phase walk abilities. Humans perform revival rituals at Ghost Altars using Spirit Fragments. Features Blood Moon events every 7 Minecraft days, procedurally generated Ancient Ruins, SQLite persistence, society-specific chat channels, PlaceholderAPI support, and DiscordSRV integration.

Building out the full plugin across ~38 files. Planning class dependencies first:

  • DatabaseManager ← PlayerData, GhostAltar

  • SocietyManager ← DatabaseManager, PlayerData

  • BloodMoonManager, RevivalManager, AltarManager, RuinManager ← SocietyManager

  • All listeners/commands ← managers

  • GhostBound (main) ← everything

Now the main plugin class and the updated managers that reference it:

All files are created. Let me now write the main entry point GhostBound.java and verify the project is complete:

Now the main plugin class that ties everything together:

Now fix the GhostCommand.java which has a wrong import for AltarManager:

Several classes are missing from disk (the create tags fired but didn’t all persist). Let me create the missing ones now:

The resource files and several Java classes are missing. Let me create all missing files:


GhostBound SMP is fully scaffolded across 38 files. Here’s a summary of every system:

πŸ—οΈ Architecture

Layer
Files
Core
GhostBound.java
,
ConfigManager
,
DatabaseManager
Managers
SocietyManager
,
AltarManager
,
RevivalManager
,
BloodMoonManager
,
RuinManager
Models
PlayerData
,
GhostAltar
,
RevivalRitual
Items
SpiritFragment
(Echo Shard with PDC tag)
Listeners
Death→Ghost conversion, Block/Combat restrictions, Blood Moon drops, Phase Walk
Commands
/ghost
,
/human
,
/gchat
,
/haunt
,
/spectralvision
,
/phasewalk
,
/ghostaltar
,
/ghostbound
GUI
Full
InventoryGUI
framework +
GhostMenuGUI
with stats
Integrations
PlaceholderAPI (
%ghostbound_status/deaths/revivals/fragments/blood_moon%
) + DiscordSRV (reflection-based soft-dep)

⚑ Key Gameplay Systems

  • Death β†’ Ghost: PlayerDeathEvent flags the player; PlayerRespawnEvent applies Adventure mode + flight + glow + Night Vision

  • Revival Ritual: 10-second countdown at a Ghost Altar consuming 10 Spirit Fragments + 1 Nether Star; cancels if human moves

  • Blood Moon: Fires every N Minecraft days (default 7), boosts mob spawns 35% chance per natural spawn, multiplies fragment drops by 2.5Γ—, triggers 10-minute thunderstorm

  • Ancient Ruins: Deterministic per-chunk generation (0.4% chance) using chunk PDC to prevent duplicates; places stone brick walls, chest with Spirit Fragments, lectern with lore book

  • Phase Walk: Toggle β†’ right-click spectral block β†’ teleport through wall (up to 5 blocks thick)

  • Spectral Vision: Scans 30-block radius for chests/ruins, pulses END_ROD/SOUL particles visible only to the ghost for 5 seconds

lithiumyt

Add plugin.yml or paper-plugin.yml file

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
38 2,681
src/main/java/com/ghostbound/GhostBound.java
package com.ghostbound;

import com.ghostbound.commands.*;
import com.ghostbound.config.ConfigManager;
import com.ghostbound.integration.DiscordSRVIntegration;
import com.ghostbound.integration.PlaceholderIntegration;
import com.ghostbound.inventory.gui.GUIListener;
import com.ghostbound.inventory.gui.GUIManager;
import com.ghostbound.items.SpiritFragment;
import com.ghostbound.listeners.*;
import com.ghostbound.managers.*;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.plugin.java.JavaPlugin;

public class GhostBound extends JavaPlugin {

    @Getter private static GhostBound instance;

    @Getter private ConfigManager configManager;
    @Getter private DatabaseManager databaseManager;
    @Getter private SocietyManager societyManager;
    @Getter private BloodMoonManager bloodMoonManager;
    @Getter private RevivalManager revivalManager;
    @Getter private AltarManager altarManager;
    @Getter private RuinManager ruinManager;
    @Getter private GUIManager guiManager;
    @Getter private DiscordSRVIntegration discordSRVIntegration;

    @Override
    public void onEnable() {
        instance = this;
        saveDefaultConfig();

        configManager = new ConfigManager(this);
        SpiritFragment.init(this);

        databaseManager = new DatabaseManager(this);
        databaseManager.initialize();

        societyManager = new SocietyManager(this);
        altarManager = new AltarManager(this);
        revivalManager = new RevivalManager(this);
        bloodMoonManager = new BloodMoonManager(this);
        ruinManager = new RuinManager(this);
        guiManager = new GUIManager();

        registerListeners();
        registerCommands();
        registerIntegrations();

        bloodMoonManager.startBloodMoonTask();

        getLogger().info("GhostBound SMP enabled. Two Societies. One World. Death Is Only The Beginning.");
    }

    @Override
    public void onDisable() {
        if (bloodMoonManager != null) bloodMoonManager.stop();
        if (societyManager != null) {
            for (org.bukkit.entity.Player player : Bukkit.getOnlinePlayers()) {
                societyManager.saveAndUnloadPlayer(player);
            }
        }
        getLogger().info("GhostBound SMP disabled.");
    }

    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new PlayerJoinQuitListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GhostRestrictionListener(this), this);
        Bukkit.getPluginManager().registerEvents(new BloodMoonDropListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PhaseWalkListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new org.bukkit.event.Listener() {
            @org.bukkit.event.EventHandler
            public void onChunkLoad(ChunkLoadEvent event) {
                ruinManager.handleChunkLoad(event);
            }
        }, this);
    }

    private void registerCommands() {
        getCommand("human").setExecutor(new HumanCommand(this));
        getCommand("ghost").setExecutor(new GhostCommand(this));
        getCommand("gchat").setExecutor(new GChatCommand(this));
        getCommand("haunt").setExecutor(new HauntCommand(this));
        getCommand("spectralvision").setExecutor(new SpectralVisionCommand(this));
        getCommand("phasewalk").setExecutor(new PhaseWalkCommand(this));
        getCommand("ghostaltar").setExecutor(new GhostAltarCommand(this));
        getCommand("ghostbound").setExecutor(new GhostBoundCommand(this));
    }

    private void registerIntegrations() {
        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new PlaceholderIntegration(this).register();
            getLogger().info("PlaceholderAPI integration registered.");
        }

        if (Bukkit.getPluginManager().getPlugin("DiscordSRV") != null) {
            discordSRVIntegration = new DiscordSRVIntegration(this);
            discordSRVIntegration.hook();
        }
    }
}