aeynz_

make an Lives plugin for 1.21+ where when you die you lost lives if you killed a player on combat any way and after you killed the player you get 1 lives add a placeholder api for scoreboard and leaderboard add configure settings to

Kodari AI
KodariJun 5 at 6:18 am 1

I’ll build a Lives plugin for 1.21+ with death penalties, kill rewards, combat logging protection, PlaceholderAPI, and leaderboards.

LivesPlugin
A lives management plugin for Minecraft 1.21+ where players lose lives on death and gain lives by killing other players. Features include combat logging protection, configurable life penalties and rewards, PlaceholderAPI expansion for scoreboards, a ranked leaderboard command, admin commands for managing lives, and fully customizable messages and settings via config.yml.

I’ll build a comprehensive Lives plugin for 1.21+ with XP-based deaths, PvP kill rewards, combat logging protection, PlaceholderAPI, and leaderboards.

LivesPlugin
A lives management plugin for Minecraft 1.21+ where players lose lives on death and gain lives by eliminating other players in PvP. Features include combat logging detection with life penalties, persistent YAML storage, PlaceholderAPI expansion for scoreboard integration, a ranked leaderboard command, admin tools for managing player lives, and fully configurable messages and gameplay settings.
aeynz_

make it paper and send the placeholder api

Kodari AI
KodariJun 5 at 6:21 am 1

Let me read all the existing files first

Got it. The plugin exists — needs Paper conversion. Let me update build.gradle to Paper API and export the PlaceholderAPI expansion class

Done. The plugin is now Paper-based and complete. Here’s what was updated:

build.gradle → switched from spigot-api to io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT with Paper’s maven repo.

PlaceholderAPI Expansion (LivesExpansion.java)

The expansion uses identifier %lives_*% — ready for scoreboards and leaderboards. Here are all the placeholders it exposes:

Placeholder
Returns
%lives_lives%
Current lives of the player
%lives_kills%
Player’s total kills
%lives_deaths%
Player’s total deaths
%lives_rank%
Leaderboard rank (1-based,
0
if unranked)
%lives_max%
Max lives from config (or
∞
)
%lives_is_in_combat%
true
/
false
if player is combat-tagged

Example scoreboard usage:

Plain Text
%lives_lives% / %lives_max%  →  "3 / 5"
Rank: #%lives_rank%          →  "Rank: #2"
PvP Stats: %lives_kills%K / %lives_deaths%D

All files exist and ready:

File
Purpose
build.gradle
Paper 1.21.3 + Lombok + PlaceholderAPI
plugin.yml
Commands, permissions, soft-depend PAPI
config.yml
Lives settings, combat timer, full messages
LivesPlugin.java
Main class — init managers, register PAPI
PlayerData.java
Lombok
@Data
— uuid, name, lives, kills, deaths
StorageManager.java
Per-player YAML files, auto-save
LivesManager.java
Core logic — death/kill/combat-log handlers, top players
CombatManager.java
Combat tag with 30s expiry, action bar support
LivesCommand.java
/lives [player]
LivesAdminCommand.java
/livesadmin
<player> <set
LeaderboardCommand.java
/livesleaderboard [topN]
(aliases:
liveslb
,
llb
)
LivesExpansion.java
✅
PlaceholderAPI expansion
— all 6 placeholders
PlayerListener.java
Join/quit save, combat tagging, death/kill handling
aeynz_

remove the combat on the plugin I already have one

Kodari AI
KodariJun 5 at 6:59 am 1

Let me read the current state of all files first

Now I’ll remove CombatManager and all references to it across the plugin

Now update LivesManager — remove handleCombatLog, and clean up config removal in the config/expansion/listener.

Now remove the is_in_combat placeholder from the expansion

aeynz_

Can you make it ban people for 1hr if they lives ran out after 1hr past they will be unban and will get 1 lives

Kodari AI
KodariJun 5 at 7:09 am 2

Now I’ll update all files to add the ban system

Now update the config with ban settings and messages:

Now add admin unban command

Let me verify the final state of the key files for consistency:

I notice a dead code line in the admin command. Let me clean that up and remove the unused import:

Right, those were for different files. Let me fix both properly

Done. Here’s what was added:

Automatic ban system — when lives hit 0, the player is kicked with a formatted ban message and saved with a ban expiry timestamp.

Auto-unban + revive — after the configured duration (default 1hr), the ban expires. When they next join (or on checkExpiredBans()), they’re unbanned and restored to revive-lives (default 1 life).

Configurable:

YAML
lives:
  ban-duration-seconds: 3600     # 1 hour
  revive-lives: 1                 # lives given after unban

Commands:

Command
Description
/lives
Check your lives
/livesadmin
<player> set
add
/livesadmin unban <player>
Manually unban (online or cached offline)
/livesleaderboard [topN]
Leaderboard

New placeholders:

Placeholder
Example
%lives_is_banned%
true
/
false
%lives_ban_time_remaining%
3599
(seconds left)
aeynz_

can like make it a real ban message on the Screen and also they're ban will be broadcast on the server

Kodari AI
KodariJun 5 at 9:31 am 1

Done. Here’s what changed:

Real ban screen — players now see a styled full-screen kick message with red borders and bold text instead of a plain chat line:

Plain Text
═══════════════════════════════════

        YOU RAN OUT OF LIVES!

    You have been temporarily banned.

    Duration: 1h 0m 0s

═══════════════════════════════════

Server broadcast — when a player is banned, the entire server sees:

Plain Text
⚠ &c{player} ran out of lives and has been banned for 1h 0m 0s!

Both use Paper’s native Adventure API (Component) — no spigot legacy methods. The broadcast message is fully configurable via messages.ban-broadcast in config.yml.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
12 838
src/main/java/com/example/livesplugin/LivesPlugin.java
package com.example.livesplugin;

import com.example.livesplugin.listener.PlayerListener;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.plugin.java.JavaPlugin;

public class LivesPlugin extends JavaPlugin {

    private LivesManager livesManager;

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

        this.livesManager = new LivesManager(this);

        registerListeners();
        registerCommands();
        registerPlaceholderAPI();

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

    @Override
    public void onDisable() {
        if (livesManager != null) {
            livesManager.saveAll();
        }
        getLogger().info("LivesPlugin has been disabled.");
    }

    public LivesManager getLivesManager() {
        return livesManager;
    }

    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new PlayerListener(this), this);
    }

    private void registerCommands() {
        getCommand("lives").setExecutor(new LivesCommand(this));
        getCommand("livesadmin").setExecutor(new LivesAdminCommand(this));
        getCommand("livesleaderboard").setExecutor(new LeaderboardCommand(this));
    }

    private void registerPlaceholderAPI() {
        if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
            new LivesExpansion(this).register();
            getLogger().info("PlaceholderAPI expansion registered!");
        } else {
            getLogger().info("PlaceholderAPI not found - placeholders unavailable.");
        }
    }

    public String color(String msg) {
        return ChatColor.translateAlternateColorCodes('&', msg);
    }
}