devil.hunter0

=============================

Plugin Specification

=============================

Plugin Name: LifeShards SMP Author: AlphaBOY7_ Minecraft Version: 1.21 – 1.21.11 Description: A unique SMP plugin where players manage LifeShards and Lives, with BanBox punishment, revival mechanics, particles, sounds, hotbar display, tablist integration, and shaped crafting recipes.

--- Core Mechanics ---

Starting Values:

LifeShards: 4 Lives: 1

On Death (PvP only):

Deaths 1–4: Drop 1 LifeShard Death 5: Drop 1 Life LifeShards: Can be consumed to increase shard count Lives: Cannot be consumed; only used for revival

Consumption Rules: - Players cannot consume LifeShards if they already hold the maximum allowed (defined in config.yml). - Attempting to consume beyond max shows a warning message: "You already have maximum LifeShards!"

Revival: - Revived players return with:

LifeShards: 3 Lives: 1 - Revival requires a LifeTotem + the Life item of the banned player - Totem pops after use, player respawns at spawn - All BanBox effects removed

BanBox: - When a player loses their last Life, they are sent to BanBox - Effects: Blindness, Slowness, Weakness, Mining Fatigue (infinite) - Admin commands: /ls banbox set <x> <y> <z> /ls banbox remove

Hotbar Display: - LifeShards and Lives shown in fancy style:

Example: "LifeShards: 4 ♥ Life" - Updates dynamically on shard/life changes

Tablist Integration: - Shows LifeShards beside player name - If player has 0 LifeShards → shows their Life count instead - If player is banned → shows "§c☠ DEAD ☠" in bold red style with skull emoji

=============================

Plugin.yml

=============================

name: LifeShards SMP main: com.alphaboy7.lifeshards.LifeShardsPlugin version: 1.0.0 author: AlphaBOY7_ description: A unique SMP plugin where players manage LifeShards and Lives, with BanBox punishment and revival mechanics. api-version: 1.21

commands: ls: description: Main LifeShards command usage: /ls <subcommand> aliases: [lifeshards] permission: lifeshards.use permissions: lifeshards.use: description: Allows use of LifeShards commands default: true lifeshards.admin: description: Allows admin commands for LifeShards default: op

=============================

Config.yml

=============================

Starting values

starting-shards: 4 starting-lives: 1

Revival values

revive-shards: 3 revive-lives: 1

Death drop rules

death-drops: shard-deaths: 4 # First 4 deaths drop shards life-death: 5 # 5th death drops a life

Max shard limit

max-shards: 9 # Players cannot consume shards beyond this number

BanBox effects

banbox-effects: blindness: true slowness: true weakness: true mining-fatigue: true

Hotbar display format

hotbar-display: enabled: true format: "LifeShards: %shards% ♥ Life: %lives%"

Tablist display format

tablist-display: enabled: true shard-format: "§b[%shards% Shards]" life-format: "§e[%lives% Life]" dead-format: "§c☠ DEAD ☠"

Particle & sound effects

effects: death: particles: [REDSTONE, SOUL_FIRE_FLAME, EXPLOSION_LARGE, DRAGON_BREATH, CRIT_MAGIC, WITCH, LAVA] sounds: [ENTITY_LIGHTNING_BOLT_THUNDER, ENTITY_WITHER_DEATH, BLOCK_PORTAL_TRAVEL, AMBIENT_CAVE, ENTITY_GHAST_SCREAM, ENTITY_ENDER_DRAGON_GROWL, BLOCK_NOTE_BLOCK_BELL] shard-drop: particles: [ENCHANTMENT_TABLE, END_ROD, TOTEM_OF_UNDYING, HAPPY_VILLAGER, HEART, GLOW] sounds: [ENTITY_EXPERIENCE_ORB_PICKUP, BLOCK_AMETHYST_BLOCK_CHIME, ENTITY_PLAYER_LEVELUP, BLOCK_NOTE_BLOCK_PLING] revival: particles: [BEACON, FIREWORKS_SPARK, TOTEM_OF_UNDYING, GLOW_SQUID_INK, CLOUD, SPELL_INSTANT, LIGHTNING] sounds: [ENTITY_PLAYER_LEVELUP, BLOCK_BEACON_ACTIVATE, MUSIC_DISC_PIGSTEP, ENTITY_ENDER_DRAGON_GROWL, ENTITY_VILLAGER_YES, BLOCK_NOTE_BLOCK_HARP, BLOCK_NOTE_BLOCK_CHIME] banbox-entry: particles: [SMOKE_LARGE, DRAGON_BREATH, PORTAL, SOUL, ASH, SNEEZE, DARK_OAK_LEAVES] sounds: [ENTITY_ENDERMAN_SCREAM, BLOCK_PORTAL_TRIGGER, AMBIENT_CAVE, ENTITY_GHAST_SCREAM, ENTITY_WITHER_SPAWN, BLOCK_NOTE_BLOCK_BASS, ENTITY_ZOMBIE_DEATH]

Crafting recipes (fully customizable with shape)

crafting: lifeshard: enabled: true shape: - " N " - "DSD" - " T " ingredients:

N: NETHER_STAR D: DIAMOND S: DIAMOND_BLOCK T: TOTEM_OF_UNDYING result: LIFESHARD amount: 1 lifetotem: enabled: true shape: - " B " - "NTN" - " S " ingredients:

B: BEACON N: NETHER_STAR T: TOTEM_OF_UNDYING S: EMERALD_BLOCK result: LIFETOTEM amount: 1

=============================

Revive INVENTORY GUI Layout

=============================

Revive Menu: title: "✦ Revive Player ✦" size: 27 # 3 rows

layout: - Slot 11: Player Head (banned player’s skull) name: "§cRevive Target" lore: - "§7This is the player you will revive." - "§ePlace their Life item in the slot below." - Slot 13: Life Item Slot name: "§aPlace Life Here" lore: - "§7Insert the Life item of the banned player." - "§cRequired to complete revival." - Slot 15: LifeTotem Icon name: "§6LifeTotem" lore: - "§7This totem is consumed in the process." - "§eRight-click to confirm revival." - Slot 22: Confirm Button (Emerald Block) name: "§aConfirm Revival" lore: - "§7Click to finalize revival." - "§eRevived player will respawn at spawn." - Slot 26: Cancel Button (Barrier) name: "§cCancel" lore: - "§7Cancel the revival process." - "§eNo items will be consumed."

animations: - On open: swirl particles (ENCHANTMENT_TABLE, SOUL_FIRE_FLAME) - On confirm: beacon beam + firework burst + angelic choir sound - On cancel: smoke particles + bass note sound.

=============================# Commands =============================

Player Commands: /ls info → Shows current LifeShards and Lives

/ls revive <player> → Opens revive menu for target player

/ls withdraw <amount> → Withdraws LifeShards into a physical item (stackable, tradable)

/ls recipe <lifeshard|lifetotem> → Displays crafting recipe in chat or INVENTORY GUI

/ls help → Lists all available player commands with descriptions

Admin Commands: /ls banbox set <x> <y> <z> → Set BanBox location

/ls banbox remove → Remove BanBox location

/ls give <player> shard <amount> → Give shards to player

/ls give <player> life <amount> → Give lives to player

/ls reload → Reload config.yml

/ls list → List all players with shard/life counts. /ls heart set <player> <amount> to directly set a player’s Max Hearts.

Kodari AI
KodariMar 16 at 11:16 am 26,183 (v2)

I’ll create a comprehensive LifeShards SMP plugin with all specified features including GUI-based revival, tablist integration, particle effects, and custom crafting.

LifeShardsSMP
A unique SMP plugin where players manage LifeShards and Lives with BanBox punishment system. Features include PvP death mechanics with item drops, revival system with GUI interface, fancy hotbar and tablist displays, particle and sound effects, custom shaped crafting recipes for LifeShards and LifeTotems, and comprehensive admin controls for server management.

Summary

I’ve created a complete LifeShards SMP plugin with all requested features:

Core Features Implemented:

  • ✅ Player data persistence (LifeShards, Lives, deaths, max hearts, BanBox status)

  • ✅ PvP death mechanics with configurable drop system (deaths 1-4 drop shards, 5th drops Life)

  • ✅ BanBox punishment system with location storage and potion effects

  • ✅ Revival GUI system with Life item + LifeTotem requirements

  • ✅ Hotbar display (action bar) with real-time updates

  • ✅ Tablist integration showing shards/lives or “☠ DEAD ☠” for banned players

  • ✅ Particle & sound effects for death, shard drops, revival, and BanBox entry

  • ✅ Custom shaped crafting recipes for LifeShard and LifeTotem

  • ✅ Consumption system with max shard limit enforcement

  • ✅ Full command suite (/ls info, revive, withdraw, recipe, help, banbox, give, reload, list, heart)

  • ✅ Recipe display GUI showing crafting patterns

  • ✅ Max hearts customization with attribute system

Technical Highlights:

  • Uses XSeries for full cross-version compatibility (1.8-1.21+)

  • GUI framework with event-driven architecture

  • Persistent data containers for custom item identification

  • Lombok for clean data classes

  • Scheduled tasks for real-time displays and BanBox effects

All files are complete, compilable, and ready to use!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
23 1,740
src/main/java/com/alphaboy7/lifeshards/LifeShardsPlugin.java
package com.alphaboy7.lifeshards;

import com.alphaboy7.lifeshards.commands.LifeShardsCommand;
import com.alphaboy7.lifeshards.data.PlayerDataManager;
import com.alphaboy7.lifeshards.inventory.gui.GUIListener;
import com.alphaboy7.lifeshards.inventory.gui.GUIManager;
import com.alphaboy7.lifeshards.items.CustomItems;
import com.alphaboy7.lifeshards.listeners.DeathListener;
import com.alphaboy7.lifeshards.listeners.ItemConsumeListener;
import com.alphaboy7.lifeshards.listeners.PlayerJoinListener;
import com.alphaboy7.lifeshards.managers.BanBoxManager;
import com.alphaboy7.lifeshards.managers.CraftingManager;
import com.alphaboy7.lifeshards.managers.DisplayManager;
import com.alphaboy7.lifeshards.managers.EffectsManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class LifeShardsPlugin extends JavaPlugin {
    private PlayerDataManager playerDataManager;
    private BanBoxManager banBoxManager;
    private EffectsManager effectsManager;
    private DisplayManager displayManager;
    private CraftingManager craftingManager;
    private GUIManager guiManager;
    
    @Override
    public void onEnable() {
        this.saveDefaultConfig();
        
        CustomItems.init(this);
        
        this.playerDataManager = new PlayerDataManager(this);
        this.banBoxManager = new BanBoxManager(this);
        this.effectsManager = new EffectsManager(this);
        this.displayManager = new DisplayManager(this);
        this.craftingManager = new CraftingManager(this);
        this.guiManager = new GUIManager();
        
        Bukkit.getPluginManager().registerEvents(new DeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new ItemConsumeListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        
        this.getCommand("ls").setExecutor(new LifeShardsCommand(this));
        
        this.getLogger().info("LifeShards SMP plugin enabled!");
    }
    
    @Override
    public void onDisable() {
        this.playerDataManager.saveData();
        this.getLogger().info("LifeShards SMP plugin disabled!");
    }
}