warieregg

Shadow Forge โ€” Complete Minecraft SMP Plugin Development Prompt

Create a production-ready Minecraft SMP plugin called Shadow Forge.

The plugin should combine a Legendary Sword System, delayed public crafting, server-wide hunting events, Shadow progression, abilities, custom GUIs, custom resource-pack textures, item ownership tracking, and random Shadow Events into one complete and optimized system.

The plugin must be designed with stability, performance, compatibility, and data safety as top priorities.

---

  1. Core Concept

Shadow Forge is a PvP-focused SMP progression plugin.

Players collect Shadow XP, level up their Shadow Core, unlock abilities, collect rare materials, and craft five Legendary Swords.

Legendary Sword crafting must NOT be instant.

When a player starts crafting a Legendary Sword, the crafting process takes between 5 and 15 minutes.

The crafting becomes a server-wide public event.

Everyone can see:

  • Which player started the craft
  • Which sword is being crafted
  • Remaining crafting time
  • Current crafting progress
  • The current/last known crafting location

Players can hunt the crafter and attempt to steal the Legendary Sword.

---

  1. Five Legendary Swords

The plugin must contain at least these five Legendary Swords:

  1. Shadow Blade

Ability:

  • Short-range Shadow Teleport
  • Configurable cooldown
  • Optional temporary darkness effect
  1. Inferno Sword

Ability:

  • Fire-based attack effect
  • Configurable chance and duration
  • Configurable cooldown
  1. Thunder Sword

Ability:

  • Chance to trigger a lightning effect on attack
  • Configurable damage/effect
  • Configurable cooldown
  1. Void Sword

Ability:

  • Powerful knockback/void-themed ability
  • Configurable range
  • Configurable cooldown
  1. Soul Reaper

Ability:

  • Killing another player grants a temporary configurable buff
  • Configurable duration
  • Configurable cooldown

Every sword must have:

  • Unique display name
  • Unique lore
  • Unique recipe
  • Unique ability
  • Rarity
  • Crafting time
  • Cooldown
  • Custom texture/model support
  • Configurable stats
  • Configurable permissions if needed

All five swords must be configurable through YAML.

---

  1. Legendary Crafting System

When a player starts crafting a Legendary Sword, start a delayed crafting process.

Default crafting time:

  • Minimum: 5 minutes
  • Maximum: 15 minutes

The exact duration must be configurable per sword.

Example:

LEGENDARY CRAFT STARTED!

Sword: Shadow Blade Crafter: PlayerName Time Remaining: 10:00 Location: X Y Z

The player's actual Minecraft username must always be displayed dynamically.

Never hardcode any player name.

---

  1. Server-Wide Craft Notifications

When crafting starts, broadcast a configurable announcement to the server.

Example:

๐Ÿšจ LEGENDARY CRAFT STARTED!

โš” Sword: Shadow Blade ๐Ÿ‘ค Crafter: PlayerName โณ Time: 10:00 ๐Ÿ“ Location: X: -245 Y: 72 Z: 819

The notification must use the actual crafter's name.

During crafting, periodically broadcast/update the crafting status.

Example:

๐Ÿ“ก LEGENDARY CRAFT UPDATE

โš” Sword: Shadow Blade ๐Ÿ‘ค Crafter: PlayerName ๐Ÿ“Š Progress: 67% โณ Remaining: 03:21 ๐Ÿ“ Last Known Location:

X: -245 Y: 72 Z: 819

Location update interval must be configurable.

Default:

location-update-seconds: 60

---

  1. Crafter Tracking

The plugin must track the player currently crafting the Legendary Sword.

Track:

  • UUID
  • Username
  • World
  • X
  • Y
  • Z
  • Sword
  • Start time
  • End time
  • Progress

The username must always be retrieved dynamically from the player's UUID.

If the player disconnects, handle it safely according to configuration.

Possible configurable behaviors:

  • Pause crafting
  • Continue crafting
  • Cancel crafting
  • Keep crafting but stop location updates

Do not duplicate or corrupt crafting sessions.

---

  1. Crafter Death System

If the crafter dies during crafting, configurable behavior must determine what happens.

Supported modes:

CANCEL RESET DROP CONTINUE

For DROP mode, drop an unfinished or configured reward at the death/forge location.

The system must prevent duplication.

A player must never receive the same Legendary Sword twice because of a death/reconnect/restart bug.

---

  1. Craft Completion

When the crafting timer reaches zero:

Broadcast:

๐Ÿ”ฅ LEGENDARY CRAFT COMPLETED!

โš” Sword: Shadow Blade ๐Ÿ‘ค Crafted by: PlayerName

The sword should then become claimable according to the configured mode.

Possible modes:

  • Give directly to crafter
  • Drop at Forge
  • Drop at crafting location
  • Spawn inside a temporary reward container

Default should preferably be a physical claim/drop system so that the server-wide PvP chase can happen.

---

  1. Legendary Sword Pickup Tracking

When a player picks up a Legendary Sword, broadcast:

๐Ÿšจ LEGENDARY ITEM CLAIMED!

โš” Sword: Shadow Blade ๐Ÿ‘ค Picked up by: PlayerName ๐Ÿ“ Location: X Y Z

Again, the player's actual username must be dynamically detected.

Never use a hardcoded username.

If another player later kills the owner and picks up the sword:

โš  LEGENDARY SWORD STOLEN!

โš” Sword: Shadow Blade ๐Ÿ‘ค New Owner: PlayerName

The plugin must update the current owner safely.

---

  1. Legendary Ownership Tracking

Track the current owner of every Legendary Sword.

Store:

  • Sword ID
  • Sword type
  • Current owner UUID
  • Current owner name
  • Creation time
  • Crafter UUID
  • Crafter name
  • Number of transfers
  • Last pickup location
  • Last death/drop location

Ownership data must survive:

  • Server restart
  • Player reconnect
  • Plugin reload
  • World restart

Do not rely only on RAM.

---

  1. Sword INVENTORY GUI

Create a INVENTORY GUI command:

/swords

This INVENTORY GUI must display all five Legendary Swords.

Example:

โš” SHADOW FORGE โ€” LEGENDARY SWORDS

๐ŸŒ‘ Shadow Blade ๐Ÿ”ฅ Inferno Sword โšก Thunder Sword ๐ŸŒ€ Void Sword ๐Ÿ’€ Soul Reaper

Clicking a sword should open detailed information.

Display:

  • Sword name
  • Rarity
  • Ability
  • Ability description
  • Cooldown
  • Crafting time
  • Recipe
  • Required materials
  • Unlock status
  • Current owner if applicable

Locked swords should show:

๐Ÿ”’ UNKNOWN SWORD

This sword has not been discovered yet.

---

  1. Shadow Core System

Every player should have a Shadow progression system.

Each player has:

  • Shadow Level
  • Shadow XP
  • Unlocked abilities
  • Shadow statistics

Default maximum level:

10

Make the maximum level configurable.

---

  1. Shadow XP

Players can earn Shadow XP through configurable activities:

  • Mining
  • PvP kills
  • Mob kills
  • Exploration
  • Legendary crafting
  • Completing Shadow Events
  • Other configurable actions

Every XP reward must be configurable.

Prevent XP exploits and duplicate rewards.

---

  1. Shadow Abilities

Default progression:

Level 1

Shadow Vision

Level 2

Shadow Speed

Level 3

Shadow Step

Level 4

Shadow Shield

Level 5

Shadow Strike

Level 6

Shadow Dash

Level 7

Shadow Escape

Level 8

Shadow Hunter

Level 9

Shadow Storm

Level 10

Shadow Realm Ultimate

Every ability must have:

  • Configurable cooldown
  • Configurable duration
  • Configurable strength
  • Permission support if needed
  • Enable/disable option

---

  1. Shadow INVENTORY GUI

Create:

/shadow

INVENTORY GUI example:

๐ŸŒ‘ SHADOW CORE

Level: 7 XP: 740 / 1000

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

โœจ ABILITIES

โœ“ Shadow Vision โœ“ Shadow Speed โœ“ Shadow Step โœ“ Shadow Shield โœ“ Shadow Strike โœ“ Shadow Dash โœ“ Shadow Escape

๐Ÿ”’ Shadow Hunter Required Level: 8

โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

โš” Current Legendary Sword Shadow Blade

The INVENTORY GUI should dynamically update.

---

  1. Forge INVENTORY GUI

Create:

/forge

If an active Legendary Craft exists:

โš’ SHADOW FORGE

โš” Shadow Blade

Crafter:

PlayerName

Progress: โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘ 70%

Time Remaining: 03:14

Location:

X / Y / Z

Status: ๐Ÿ”ฅ ACTIVE

If there is no active craft:

โš’ SHADOW FORGE

No Legendary Craft is currently active.

[View Recipes]

Also support:

/forge status /forge recipes

---

  1. Shadow Events

Add random server-wide Shadow Events.

Example:

๐ŸŒ‘ SHADOW RIFT HAS OPENED!

A mysterious Rift has appeared somewhere in the world.

Find it and claim its rewards!

Shadow Rifts may contain:

  • Custom mobs
  • Rare materials
  • Shadow XP
  • Legendary crafting materials
  • Rare loot
  • Special rewards

Event frequency, location rules, rewards, and difficulty must be configurable.

---

  1. Resource Pack / Custom Texture System

The plugin must support custom textures for all five Legendary Swords.

The resource-pack system must be integrated into the plugin.

The plugin should include a resource-pack structure such as:

ShadowForge/ โ”œโ”€โ”€ config.yml โ”œโ”€โ”€ swords.yml โ”œโ”€โ”€ shadow.yml โ”œโ”€โ”€ messages.yml โ””โ”€โ”€ resourcepack/ โ”œโ”€โ”€ pack.mcmeta โ””โ”€โ”€ assets/ โ””โ”€โ”€ ...

Each Legendary Sword should be able to use a custom model/texture.

Example:

Shadow Blade โ†’ Custom Shadow Model Inferno Sword โ†’ Custom Fire Model Thunder Sword โ†’ Custom Lightning Model Void Sword โ†’ Custom Void Model Soul Reaper โ†’ Custom Soul Model

---

  1. Resource Pack Delivery

The plugin must support automatic resource-pack delivery.

Config:

resource-pack: enabled: true auto-send: true required: false prompt: true url: "" sha1: ""

The plugin should safely send the resource pack to players.

If the resource pack fails to download:

  • Do NOT crash the server
  • Do NOT crash the client
  • Continue normal gameplay
  • Log a clear warning
  • Use normal Minecraft item appearance as fallback

The resource pack must never be required for the plugin's core functionality.

---

  1. Version Compatibility

Design the plugin with a compatibility layer.

The goal is to support as many Minecraft versions as realistically possible.

Use version-specific adapters where necessary.

For modern versions, use the modern item-model/resource-pack system.

For older supported versions, use the appropriate legacy-compatible method.

If a Minecraft version cannot safely support a custom texture/model:

  • Do not crash
  • Do not force an incompatible pack
  • Disable only the unsupported visual feature
  • Keep the sword and gameplay functional
  • Use a safe vanilla fallback

Do NOT claim impossible universal compatibility with every past and future Minecraft version.

Instead, create a clean supported-version architecture so new versions can be added through adapters.

---

  1. Crash & Bug Prevention

Stability is extremely important.

The plugin must be designed to avoid:

  • Server crashes
  • Client crashes
  • Infinite loops
  • Memory leaks
  • Duplicate rewards
  • Duplicate sword items
  • Duplicate crafting sessions
  • Duplicate pickup events
  • Corrupted save data
  • Broken GUIs
  • Invalid recipe crashes
  • Resource-pack crashes
  • Async thread issues
  • Uncancelled scheduled tasks
  • NullPointerExceptions
  • World unload errors

All asynchronous tasks must be properly managed and cancelled.

Do not perform unsafe Bukkit/Paper API operations from asynchronous threads.

---

  1. Server Restart Recovery

If the server restarts during a Legendary Craft:

The plugin must save the active craft.

After restart:

  • Restore the crafting session
  • Restore remaining time
  • Restore crafter UUID
  • Restore sword type
  • Restore location
  • Restore progress
  • Continue safely

No duplicated rewards should be generated.

---

  1. Player Disconnect Recovery

If the crafter disconnects:

Handle according to configuration.

If the sword is already dropped and the owner disconnects:

Do not delete or duplicate the sword.

If a player reconnects:

Restore all Shadow data and ownership data correctly.

---

  1. Data Storage

Support:

SQLite

Default.

MySQL

Optional.

Store:

  • Shadow XP
  • Shadow Level
  • Abilities
  • Legendary Sword ownership
  • Craft history
  • Active crafts
  • Event statistics

Use UUIDs as the primary player identifier.

---

  1. Admin Commands

Add:

/shadowadmin reload /shadowadmin give <player> <sword> /shadowadmin setlevel <player> <level> /shadowadmin addxp <player> <amount> /shadowadmin startevent /shadowadmin startforge <sword> /shadowadmin cancel /shadowadmin reset <player>

Add permission nodes for every admin command.

---

  1. Craft History / Logs

Add an admin-only craft history system.

Track:

  • Crafter
  • Sword
  • Start time
  • Completion time
  • Location
  • Result
  • Death/cancellation
  • Current owner
  • Pickup history
  • Number of transfers

Optional command:

/shadowadmin history

---

  1. Discord Webhook Support

Optional Discord webhook support.

Example:

๐Ÿšจ LEGENDARY CRAFT STARTED

Sword: Shadow Blade Crafter: PlayerName Location: X Y Z Time: 10 Minutes

Also send events for:

  • Craft completion
  • Sword pickup
  • Sword theft
  • Sword drop
  • Shadow Rift spawn

Webhook must be asynchronous and must never freeze the server thread.

---

  1. Configuration

Everything important must be configurable.

Examples:

forge: enabled: true min-time: 300 max-time: 900 location-update-seconds: 60 announce-start: true announce-progress: true announce-complete: true

tracking: enabled: true

shadow: enabled: true max-level: 10

events: enabled: true random-events: true

database: type: SQLITE

All messages should be configurable through "messages.yml".

---

  1. Performance Requirements

The plugin must be optimized for SMP servers.

Avoid:

  • Constant heavy loops
  • Checking every player every tick unnecessarily
  • Excessive database queries
  • Excessive particle spawning
  • Unnecessary packet operations

Use efficient scheduled tasks.

The plugin should remain lightweight even with many players online.

---

  1. Anti-Exploit Protection

Prevent:

  • Item duplication
  • Craft duplication
  • Pickup duplication
  • Death duplication
  • Disconnect duplication
  • Restart duplication
  • Hopper duplication where applicable
  • INVENTORY GUI-click exploits
  • Ability spam
  • XP farming exploits

All important rewards must have unique transaction/event IDs where appropriate.

---

  1. Testing Requirements

Before release, thoroughly test:

Player Join Resource Pack Send Resource Pack Accept Resource Pack Reject Resource Pack Download Failure Player Disconnect Player Reconnect Craft Start Craft Progress Craft Completion Crafter Death Crafter Disconnect Server Restart During Craft Sword Drop Sword Pickup Sword Transfer Sword Death Drop INVENTORY GUI Opening INVENTORY GUI Clicking Shadow XP Shadow Level Up Abilities Shadow Events Database Save Database Load Plugin Reload World Unload Unsupported Resource Pack Version

The plugin must fail gracefully instead of crashing.

---

  1. Final Gameplay Loop

The final gameplay experience should be:

Collect Rare Materials โ†“ Start Legendary Sword Craft โ†“ 5โ€“15 Minute Public Crafting Timer โ†“ Server Notification โ†“ Crafter Name Revealed โ†“ Crafting Location Revealed โ†“ Players Hunt Crafter โ†“ Crafter Defends the Forge โ†“ Craft Completes โ†“ Legendary Sword Appears โ†“ Player Claims Sword โ†“ Claimant Name Revealed โ†“ PvP Chase Begins โ†“ Sword Can Be Stolen โ†“ New Owner Becomes Target โ†“ Shadow XP & Progression โ†“ Random Shadow Events โ†“ More Rare Materials โ†“ Next Legendary Craft

The final result should feel like a complete PvP-focused SMP progression system, not just a basic sword plugin.

Make the code clean, modular, documented, optimized, maintainable, and production-ready.

Target modern Paper servers first, with a compatibility architecture for older supported versions. Never sacrifice server/client stability just to force unsupported resource-pack features.

Kodari AI
KodariAug 10 at 10:18 am 27
ShadowForge
A PvP-focused SMP progression plugin combining a Legendary Sword crafting system with server-wide public events, Shadow XP progression, custom abilities, and resource-pack texture support. Players collect Shadow XP, level up their Shadow Core, unlock abilities, gather rare materials, and craft five Legendary Swords through a delayed 5-15 minute public crafting process that broadcasts the crafter's name and location to the entire server. Other players can hunt the crafter and steal the completed sword, creating a dynamic PvP chase. Includes configurable crafting times, death/disconnect recovery modes, SQLite/MySQL storage, ownership tracking, custom GUIs for swords/shadow/forge, random Shadow Rift events, Discord webhook integration, and comprehensive admin commands with anti-exploit protections.
  1. Create the Paper/Gradle project, configuration, command registrations, and resource-pack asset structure.

  2. Implement persistent SQLite-backed Shadow progression, forge-session recovery, ownership, and craft history.

  3. Add legendary swords, delayed public crafting, pickups/deaths/disconnect handling, abilities, XP, events, resource-pack delivery, and GUI commands.

  1. Project foundation created: Gradle, Paper manifest, commands, configurable swords/abilities, and resource-pack model structure.

  2. Implementing the persistent forge, progression, ownership, GUI, events, and command services.

  1. Core services created: SQLite recovery storage, session transaction records, ownership records, sword registry, XP progression, timed forge completion, resource-pack delivery, rifts, and protected dynamic menus.

  2. Wiring player lifecycle/combat behavior and player/admin command paths.

Created Shadow Forge as a modern Paper plugin project with:

  • Config-driven five legendary swords, recipes, stats, abilities, custom model data, and resource-pack structure.

  • SQLite persistence for Shadow progression, active forge recovery, ownership transfers, and craft history.

  • Public timed forge events with configurable disconnect/death/completion modes and anti-duplicate session handling.

  • /swords, /shadow, /forge, and /shadowadmin command paths with inventory GUIs.

  • Shadow XP/levels, ability activation, combat sword effects, rift events, resource-pack delivery, pickup/theft broadcasts, and player lifecycle handling.

  • Gradle build configuration, plugin.yml, configurable messages, progression definitions, and resource-pack model files.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
35 1,512
src/main/java/com/kodari/shadowforge/ShadowForgePlugin.java
package com.kodari.shadowforge;

import com.kodari.shadowforge.command.ShadowCommand;
import com.kodari.shadowforge.config.PluginConfig;
import com.kodari.shadowforge.data.Database;
import com.kodari.shadowforge.gui.MenuListener;
import com.kodari.shadowforge.gui.MenuService;
import com.kodari.shadowforge.listener.PlayerListener;
import com.kodari.shadowforge.listener.ProgressionListener;
import com.kodari.shadowforge.service.EventService;
import com.kodari.shadowforge.service.ForgeService;
import com.kodari.shadowforge.service.ResourcePackService;
import com.kodari.shadowforge.service.ShadowService;
import com.kodari.shadowforge.service.SwordService;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Objects;

public final class ShadowForgePlugin extends JavaPlugin {
    private PluginConfig pluginConfig;
    private Database database;
    private SwordService swordService;
    private ShadowService shadowService;
    private ForgeService forgeService;
    private EventService eventService;
    private ResourcePackService resourcePackService;
    private MenuService menuService;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("swords.yml", false); saveResource("shadow.yml", false); saveResource("messages.yml", false);
        pluginConfig = new PluginConfig(this);
        database = new Database(this, pluginConfig.databaseFile()); database.open();
        swordService = new SwordService(this, pluginConfig, database);
        shadowService = new ShadowService(this, pluginConfig, database);
        forgeService = new ForgeService(this, pluginConfig, database, swordService, shadowService);
        eventService = new EventService(this, pluginConfig, shadowService);
        resourcePackService = new ResourcePackService(this, pluginConfig);
        menuService = new MenuService(this, swordService, shadowService, forgeService);
        Bukkit.getPluginManager().registerEvents(new MenuListener(menuService), this);
        Bukkit.getPluginManager().registerEvents(new PlayerListener(this, forgeService, swordService, resourcePackService), this);
        Bukkit.getPluginManager().registerEvents(new ProgressionListener(pluginConfig, shadowService, swordService), this);
        ShadowCommand command = new ShadowCommand(this);
        registerCommand("swords", command); registerCommand("shadow", command); registerCommand("forge", command); registerCommand("shadowadmin", command);
        forgeService.start(); eventService.start();
    }

    @Override
    public void onDisable() {
        if (eventService != null) eventService.stop();
        if (forgeService != null) forgeService.stop();
        if (database != null) database.close();
    }

    public void reloadShadowForge() { reloadConfig(); pluginConfig.reload(); swordService.reload(); shadowService.reload(); }
    private void registerCommand(String name, ShadowCommand command) { PluginCommand pluginCommand = Objects.requireNonNull(getCommand(name), "Missing command " + name); pluginCommand.setExecutor(command); pluginCommand.setTabCompleter(command); }
    public PluginConfig cfg() { return pluginConfig; }
    public Database database() { return database; }
    public SwordService swords() { return swordService; }
    public ShadowService shadows() { return shadowService; }
    public ForgeService forge() { return forgeService; }
    public EventService events() { return eventService; }
    public MenuService menus() { return menuService; }
}