demon059794

“Generate FULL Java code for ALL classes, listeners, commands, managers, tasks, config.yml, lives.yml creation, and plugin.yml. The plugin must compile & run perfectly on Paper 1.21.11 with no errors.”

📎 1 file 3,952 chars
📄
pasted-code-1772193511383.txt
txt 246 lines
▶
**“Create a completely standalone Paper 1.21.11 plugin named BloodLifeSystem.
Use ONLY Paper API (no NMS).
This plugin must implement:

A full LIFE SYSTEM (victim loses life, killer gains life),

A REVIVE BOOK SYSTEM with a INVENTORY GUI showing banned players,

A SCHEDULED BLOOD MOON EVENT every hour lasting one hour.
The plugin must be optimized, event-based, and bug-free.”**

⭐ 1. LIFE SYSTEM (Main Mechanic)
✔ Starting Lives

Every player starts with 5 lives (configurable).

✔ On PvP Kill:

When Player A kills Player B:

🟥 Victim (Player B):

Loses 1 life

Send message: “💔 You lost 1 life!”

🟩 Killer (Player A):

Gains +1 life

Send message: “❤️ You gained +1 life!”

✔ Data must update instantly in lives.yml.
⭐ 2. ZERO LIVES = PERMANENT BAN

When a player reaches 0 lives:

Permanently ban them

Add banned info to lives.yml

Prevent them from joining

Show custom ban message

Broadcast to all players:
“💀  has lost all lives and is now BANNED!”

❗ Only PvP deaths count

Void, fall, lava, mobs → DO NOT reduce lives.

⭐ 3. LIVES.YML FORMAT
player-uuid:
  name: "PlayerName"
  lives: 3
  banned: false

Plugin must create this file automatically.

⭐ 4. REVIVE BOOK SYSTEM
✔ Custom Revive Book Item

Name: “Revive Book”

Glowing

CustomModelData support

Right-click opens INVENTORY GUI

✔ Give command:

/revivebook give 

⭐ 5. REVIVE INVENTORY GUI (Banned Players Menu)

When Revive Book is right-clicked:

Open INVENTORY GUI:
Title: “Revive a Player”

Show ALL banned players as Player Heads

SkullMeta = banned player skin

Lore: “Click to revive this player.”

✔ On click:

Unban the player

Restore 3 lives (configurable)

Update lives.yml

Remove from banned list

Broadcast:
“✨  has been revived!”

Play sound + particles

✔ If no banned players:

Show Barrier item “No banned players.”

⭐ 6. CRAFTING RECIPE (HARD)

Add a very hard recipe for Revive Book:

recipe:
  - NETHER_STAR
  - ENCHANTED_GOLDEN_APPLE
  - TOTEM_OF_UNDYING
  - ENCHANTED_GOLDEN_APPLE
  - HEART_FRAGMENT (custom item)

Recipe must be configurable.

⭐ 7. AUTOMATIC HOURLY BLOOD MOON

Blood Moon triggers every 60 minutes and lasts 60 minutes.
Configurable interval and duration.

✔ On Blood Moon Start:

Red sky + red fog

Thunder sound

BossBar “Blood Moon Active”

Global broadcast: “🔴 BLOOD MOON HAS BEGUN!”

Stronger mobs:

Damage ×1.5

+6 HP

Spawn ×2

Save state so reload doesn’t break the event

✔ On Blood Moon End:

Reset sky + fog

Remove bossbar

Reset mobs

Broadcast: “⚫ Blood Moon has ended.”

⭐ 8. BLOOD MOON ADMIN COMMANDS
/bloodmoon start
/bloodmoon stop
/bloodmoon status

Permissions must be included.

⭐ 9. PLAYER COMMANDS

Only these:

/lives          # show own lives
/bloodmoon status
/revivebook use # opens revive INVENTORY GUI
⭐ 10. ADMIN COMMANDS
/lives set  
/lives add  
/lives remove  
/revive 
/revivebook give 
/bloodmoon start
/bloodmoon stop
/bloodmoon status
/bloodlife reload
⭐ 11. CONFIG.YML REQUIRED
starting-lives: 5
max-lives: 15

revive:
  lives-restored: 3
  model-data: 1234

bloodmoon:
  enabled: true
  interval-minutes: 60
  duration-minutes: 60
  mob-damage-multiplier: 1.5
  mob-health-bonus: 6
  sky-color: "#8A0000"
  fog-color: "#550000"

messages:
  life-lost: "💔 You lost 1 life!"
  life-gained: "❤️ You gained +1 life!"
  player-banned: "💀 %player% has been permanently banned!"
  player-revived: "✨ %player% has been revived!"
  bloodmoon-start: "🔴 BLOOD MOON HAS BEGUN!"
  bloodmoon-end: "⚫ Blood Moon has ended."
⭐ 12. plugin.yml MUST INCLUDE

All commands

All permissions

API version 1.21

Name + Version

Main class

Description

⭐ 13. CLASSES TO IMPLEMENT

Main (BloodLifeSystem)

LifeManager

DeathListener (PvP kill listener)

BanManager

ReviveBookItem

ReviveGUI

ReviveClickHandler

BloodMoonManager

BloodMoonScheduler

Commands:

LivesCommand

ReviveCommand

BloodMoonCommand

ReviveBookCommand
Kodari AI
KodariFeb 27 at 12:02 pm 24,078 (v2)

I’ll create a comprehensive BloodLifeSystem plugin with all requested features.

BloodLifeSystem
A hardcore survival plugin featuring a dynamic life system where players lose lives on PvP death and can be permanently banned. Includes a Revive Book GUI system for restoring banned players and an automatic hourly Blood Moon event with enhanced mob difficulty, atmospheric effects, and boss bar tracking.
BloodLifeSystem
A hardcore survival plugin featuring a dynamic life system where players lose lives on PvP death and can be permanently banned. Includes a Revive Book GUI system for restoring banned players and an automatic hourly Blood Moon event with enhanced mob difficulty, atmospheric effects, and boss bar tracking.

Creating BloodLifeSystem plugin

  • Full life system with PvP tracking

  • Revive Book GUI with player head display

  • Automated Blood Moon event with scheduler

  • Complete command system with permissions

All classes created with complete functionality - life system with PvP tracking, GUI-based revive system with player heads, automated Blood Moon scheduler, comprehensive command system, and full configuration support.

demon059794

create config.yml to for for coustmising in config we can change every single thing add that

Kodari AI
KodariFeb 27 at 12:07 pm 26,417 (v2)

I’ll read the existing files to understand all features that need to be configurable, then create a comprehensive config.yml.

Now I’ll create a comprehensive config.yml that allows customization of every aspect of the plugin.

Now I need to update the code files to read from these new config paths. Let me update the necessary classes:

Now I’ll update all the Java files to read from these new config paths:

Created comprehensive config.yml with every customizable aspect including life system settings, Blood Moon mechanics, GUI layouts, all messages with placeholders, sounds, particles, ban messages, and command responses. Updated all Java files to read from the new config structure with proper color code support and placeholders.

demon059794

**“Add two major features into my Paper 1.21.11 plugin:

A real-time ActionBar that shows every player's current lives above the hotbar,

A Revive Book INVENTORY GUI that uses BOOK items instead of player heads, where each BOOK is named after a banned player. Clicking the Book revives that player.

Use only Paper API (no NMS).”**

⭐ FEATURE 1: ACTIONBAR LIFE DISPLAY ✔ Display Lives Above Hotbar

Every online player must always see an ActionBar message above their hotbar.

Message format (configurable):

❤️ Lives: <number>

Display must update automatically every 1 second (20 ticks).

Use:

player.sendActionBar(Component.text("❤️ Lives: " + lives, NamedTextColor.RED)); ✔ ActionBar Must Update Instantly When:

Player kills someone (+1 life)

Player dies in PvP (−1 life)

Admin changes lives

Player is revived

Player rejoins

✔ Config: actionbar: enabled: true format: "❤️ Lives: %lives%" interval: 20 ✔ Task Class Required:

LifeActionBarTask.java

Runs repeating scheduler updating all online players.

⭐ FEATURE 2: REVIVE INVENTORY GUI USING BOOK ITEMS ✔ Right-click Revive Book → Open INVENTORY GUI

INVENTORY GUI Title:

"Revive a Player" ✔ INVENTORY GUI Must Show:

One BOOK item per banned player

Book name = banned player's username Example:

DisplayName = "Phantom_Warrior"

Lore:

"Click to revive this player" ✔ If No Banned Players:

Show a single BARRIER item Name: “No players to revive”

⭐ CLICK BEHAVIOR (Very Important)

When a player clicks a BOOK:

Get the book's display name → that is the banned player’s username

Unban the player using:

Bukkit.getBanList(BanList.Type.NAME).pardon(name);

Set the player in lives.yml:

banned: false lives: <revive-lives>

Broadcast:

✨ <player> has been revived!

Play sound + particle

Close INVENTORY GUI

Remove from revive list

✔ Config: revive: lives-restored: 3 use-books: true ⭐ REQUIRED CLASSES (AI MUST GENERATE) ActionBar:

LifeActionBarTask.java

Revive System:

ReviveBookItem.java

ReviveGUI.java

ReviveClickListener.java

BanManager.java

Integration with lives.yml

Kodari AI
KodariFeb 27 at 3:53 pm 56,427 (v2)

I need to read the existing code to understand what’s already implemented before adding these features.

Now I’ll implement both features:

Analysis:

  • The plugin already has a GUI framework and ReviveGUI using player heads - needs to switch to BOOK items

  • Need to create LifeActionBarTask for real-time life display above hotbar

  • Need to add instant actionbar updates on life changes

  • Need to add Bukkit ban list integration

Now I’ll create the LifeActionBarTask and update the necessary files:

Now I’ll create the LifeActionBarTask and update all necessary files:

All features implemented successfully:

✅ Feature 1: Real-time ActionBar Display

  • Created LifeActionBarTask that updates every player’s actionbar every second (20 ticks)

  • Shows “❤️ Lives: X” above hotbar using Paper’s Adventure API

  • Updates instantly on death, kill, admin changes, and player join

  • Configurable format and interval in config.yml

✅ Feature 2: Revive GUI with Book Items

  • Changed ReviveGUI to use BOOK items instead of player heads

  • Each book is named after the banned player

  • Clicking a book revives that player and pardons them from Bukkit’s ban list

  • Integrates with existing revive book consumption system

  • Shows barrier item when no banned players exist

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
23 1,809
src/main/java/com/bloodlife/BloodLifeSystem.java
package com.bloodlife;

import com.bloodlife.command.BloodMoonCommand;
import com.bloodlife.command.LivesCommand;
import com.bloodlife.command.ReviveBookCommand;
import com.bloodlife.command.ReviveCommand;
import com.bloodlife.inventory.gui.GUIListener;
import com.bloodlife.inventory.gui.GUIManager;
import com.bloodlife.item.ReviveBookItem;
import com.bloodlife.listener.DeathListener;
import com.bloodlife.listener.ReviveClickHandler;
import com.bloodlife.manager.BanManager;
import com.bloodlife.manager.BloodMoonManager;
import com.bloodlife.manager.BloodMoonScheduler;
import com.bloodlife.manager.LifeManager;
import com.bloodlife.task.LifeActionBarTask;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class BloodLifeSystem extends JavaPlugin {
    private LifeManager lifeManager;
    private BanManager banManager;
    private BloodMoonManager bloodMoonManager;
    private BloodMoonScheduler bloodMoonScheduler;
    private ReviveBookItem reviveBookItem;
    private GUIManager guiManager;
    private LifeActionBarTask actionBarTask;

    public LifeManager getLifeManager() {
        return lifeManager;
    }

    public BanManager getBanManager() {
        return banManager;
    }

    public BloodMoonManager getBloodMoonManager() {
        return bloodMoonManager;
    }

    public BloodMoonScheduler getBloodMoonScheduler() {
        return bloodMoonScheduler;
    }

    public ReviveBookItem getReviveBookItem() {
        return reviveBookItem;
    }

    public GUIManager getGuiManager() {
        return guiManager;
    }

    public LifeActionBarTask getActionBarTask() {
        return actionBarTask;
    }

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

        this.lifeManager = new LifeManager(this);
        this.banManager = new BanManager(this);
        this.bloodMoonManager = new BloodMoonManager(this);
        this.reviveBookItem = new ReviveBookItem(this);
        this.guiManager = new GUIManager();

        Bukkit.getPluginManager().registerEvents(new DeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new ReviveClickHandler(this), this);
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);

        getCommand("lives").setExecutor(new LivesCommand(this));
        getCommand("revive").setExecutor(new ReviveCommand(this));
        getCommand("bloodmoon").setExecutor(new BloodMoonCommand(this));
        getCommand("revivebook").setExecutor(new ReviveBookCommand(this));

        if (getConfig().getBoolean("bloodmoon.enabled", true)) {
            this.bloodMoonScheduler = new BloodMoonScheduler(this);
            long intervalMinutes = getConfig().getLong("bloodmoon.interval-minutes", 60);
            long intervalTicks = intervalMinutes * 60 * 20;
            bloodMoonScheduler.runTaskTimer(this, intervalTicks, intervalTicks);
        }

        if (getConfig().getBoolean("actionbar.enabled", true)) {
            this.actionBarTask = new LifeActionBarTask(this);
            long interval = getConfig().getLong("actionbar.interval", 20);
            actionBarTask.runTaskTimer(this, 0L, interval);
        }

        getLogger().info("BloodLifeSystem has been enabled!");
    }

    @Override
    public void onDisable() {
        if (bloodMoonScheduler != null) {
            bloodMoonScheduler.cancel();
        }
        if (actionBarTask != null) {
            actionBarTask.cancel();
        }
        if (bloodMoonManager != null) {
            bloodMoonManager.stopBloodMoon();
        }
        if (lifeManager != null) {
            lifeManager.save();
        }
        getLogger().info("BloodLifeSystem has been disabled!");
    }
}