the_mikeyy_

make a plugin where if a player dies 7 times then player gets banned but every time a player dies there head should drop and if that head is placed on a gold block then the player gets there life back by the number of heads placed on the gold block and when the head is placed on a gold block the head should get vanished and the player should get his life and when a player dies by an player an energy type glow effect should come out of the player who killed another player and if a player had 1 head in his inventory then the player who killed another player will get resistance 5 for 10 minutes

Kodari AI
KodariMar 4 at 3:46 pm 12,286 (v2)

I’ll create a lifesteal plugin with death tracking, head mechanics, and killer effects.

LifeStealPlugin
A hardcore survival plugin where players have 7 lives. Each death drops their head and costs a life. When lives reach zero, the player is banned. Players can restore lives by placing their head on a gold block. Killers receive a glowing energy effect, and if they have a player head in their inventory, they gain Resistance V for 10 minutes. Features automatic life tracking and persistent data storage.

Plugin created! Here’s what it does:

Core Features:

  • Players start with 7 lives; lose 1 per death

  • At 0 lives, player is banned automatically

  • Each death drops the player’s head with their name

  • Placing a head on a gold block restores 1 life to that player and vanishes the head

  • Killers get a spiraling green particle effect for 2 seconds

  • Killers with any player head in their inventory gain Resistance V for 10 minutes

Commands:

  • /lives [player] - Check remaining lives

  • /setlives <player> <amount> - Admin: set lives

  • /resetlives <player> - Admin: reset to max lives

Technical:

  • Persistent storage in lives.yml

  • Configurable max lives, resistance duration, and messages

  • XSeries for cross-version compatibility

  • Particle spiral effect around killer on PvP kills

the_mikeyy_

add another thing in the plugin we just made that if a player puts all 7 heads of a banned player on diamond block then the banned player gets unbaned

Kodari AI
KodariMar 4 at 3:55 pm 17,067 (v2)

I’ll add a feature where placing 7 heads of a banned player on diamond blocks unbans them. Let me first check the current implementation.

I’ll add a system to track heads placed on diamond blocks and unban players when all 7 are placed. This requires:

  • New manager to track head placements

  • Update BlockPlaceListener to handle diamond blocks

  • New BlockBreakListener to handle cleanup

  • Config messages for unban feature

All files created and updated. The plugin now supports unbanning banned players by placing 7 of their heads on diamond blocks, with tracking that persists across restarts.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
17 807
src/main/java/com/lifesteal/plugin/LifeStealPlugin.java
package com.lifesteal.plugin;

import com.lifesteal.plugin.commands.LivesCommand;
import com.lifesteal.plugin.commands.ResetLivesCommand;
import com.lifesteal.plugin.commands.SetLivesCommand;
import com.lifesteal.plugin.listeners.BlockBreakListener;
import com.lifesteal.plugin.listeners.BlockPlaceListener;
import com.lifesteal.plugin.listeners.PlayerDeathListener;
import com.lifesteal.plugin.listeners.PlayerJoinListener;
import com.lifesteal.plugin.managers.DataManager;
import com.lifesteal.plugin.managers.EffectManager;
import com.lifesteal.plugin.managers.LifeManager;
import com.lifesteal.plugin.managers.UnbanManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class LifeStealPlugin extends JavaPlugin {

    private LifeManager lifeManager;
    private DataManager dataManager;
    private EffectManager effectManager;
    private UnbanManager unbanManager;

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

        this.dataManager = new DataManager(this);
        this.lifeManager = new LifeManager(this);
        this.effectManager = new EffectManager(this);
        this.unbanManager = new UnbanManager(this);

        dataManager.loadPlayerData();

        getServer().getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        getServer().getPluginManager().registerEvents(new BlockPlaceListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        getServer().getPluginManager().registerEvents(new BlockBreakListener(this), this);

        getCommand("lives").setExecutor(new LivesCommand(this));
        getCommand("setlives").setExecutor(new SetLivesCommand(this));
        getCommand("resetlives").setExecutor(new ResetLivesCommand(this));

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

    @Override
    public void onDisable() {
        dataManager.savePlayerData();
        unbanManager.saveData();
        getLogger().info("LifeStealPlugin has been disabled!");
    }
}