redstonem34-lab

Make me a headsteal plugin like this video

Kodari AI
KodariJul 12 at 10:27 am 1

I’ll create a head-stealing PvP plugin where players earn each other’s heads on kill.

HeadSteal
A PvP head-stealing plugin that drops a player's head when killed by another player, complete with the victim's skin. Features configurable drop chances, per-player cooldowns, sound effects, customizable messages, and world blacklisting. Supports all Minecraft versions through XSeries integration.
redstonem34-lab

And mob heads??

Kodari AI
KodariJul 12 at 10:29 am 1

Now I’ll add mob head drops — when a player kills a mob, there’s a configurable chance to get its head

Now I’ll add mob head support across all the files.

Now add the mob kill handler and update config.

Now update config.yml with mob head section and the new message.

Let me verify the final state of the files.

Done. Here’s what was added:

Mob heads — when a player kills a mob, there’s a configurable chance to get its head with the mob’s skin applied via XSkull’s Profileable.detect(). Supports 40+ mob types (Zombie, Skeleton, Creeper, Wither Skeleton, Piglin, Blaze, Enderman, Warden, etc.).

Config (config.yml):

  • mob-heads.enabled — toggle on/off

  • mob-heads.global-chance — fallback rate (0.25 = 25%) for any mob not individually listed

  • mob-heads.mobs.ZOMBIE: 0.3 — per-mob override rates (Wither/Ender Dragon default to 100%)

  • mob-head-dropped message key with {mob} placeholder

Logic flow:

  1. PlayerKillListener.onMobDeath() — fires on any mob kill

  2. Checks: enabled, not a player, killer exists, not blacklisted world, mob type is in the known list

  3. HeadManager.rollMobHeadDrop() — checks per-mob chance first, falls back to global

  4. HeadManager.createMobHead() — uses Profileable.detect(mobType) for the skin, falls back to zombie head item if profile fails

  5. Drops head at death location, sends message, plays sound

redstonem34-lab

Add mob head abilities too

Kodari AI
KodariJul 12 at 10:42 am 7

I’ll add a full mob head ability system — each mob head grants unique powers when held (passive effects, right-click actives, and on-hit abilities).

Now I’ll build the full ability system. I need these files:

  1. AbilityManager — runs passive effects, fires actives, handles on-hit

  2. MobHeadAbility — data class for each mob’s ability

  3. HeadAbilityListener — events for right-click/on-hit

  4. Update HeadManager (add lore), ConfigManager, HeadStealPlugin, config.yml

Now I’ll create the ability system. This involves:

  1. MobHeadAbility — data class per mob

  2. AbilityManager — runs passive effects, tracks active cooldowns

  3. HeadAbilityListener — handles right-click actives and on-hit effects

  4. Update HeadManager — add lore to mob heads

  5. Update ConfigManager, HeadStealPlugin, config.yml

Now update PlayerKillListener to pass lore, and create all the ability files

Now I’ll create the ability system files. Starting with the data class, ability manager, and listener.

Now create the AbilityManager and HeadAbilityListener

Now I’ll create the AbilityManager and HeadAbilityListener:

redstonem34-lab

Well continue

Kodari AI
KodariJul 12 at 11:01 am 2

<kodariReadFile>src/main/java/com/headsteal/abilities/AbilityManager

redstonem34-lab

The compilation failed with this error:

code
Compilation failed with 3 error(s):

ERROR in src/main/java/com/headsteal/HeadStealPlugin.java at line 5: cannot find symbol
import com.headsteal.listeners.HeadAbilityListener;
                              ^
  symbol: class HeadAbilityListener
  location: package com.headsteal.listeners

ERROR in src/main/java/com/headsteal/abilities/AbilityManager.java at line 19: cannot find symbol
    private static final Map<String, MobHeadAbility> ABILITIES = new HashMap<>();
                                     ^
  symbol: class MobHeadAbility
  location: class AbilityManager

ERROR in src/main/java/com/headsteal/abilities/AbilityManager.java at line 74: cannot find symbol
    public static MobHeadAbility getAbility(String mobType) {
                  ^
  symbol: class MobHeadAbility
  location: class AbilityManager


=== COMPILATION ERROR ANALYSIS ===

MISSING CLASSES:
  - HeadAbilityListener
  - MobHeadAbility
ACTION: Create these classes or check imports

FILES TO INVESTIGATE:
  - src/main/java/com/headsteal/HeadStealPlugin.java
  - src/main/java/com/headsteal/abilities/AbilityManager.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJul 12 at 12:46 pm 4

Missing MobHeadAbility and HeadAbilityListener classes. Let me create both

Filesystem is read-only — need to use the proper tags. Let me create all three files:

redstonem34-lab

The compilation failed with this error:

code
Compilation failed with 3 error(s):

ERROR in src/main/java/com/headsteal/HeadStealPlugin.java at line 5: cannot find symbol
import com.headsteal.listeners.HeadAbilityListener;
                              ^
  symbol: class HeadAbilityListener
  location: package com.headsteal.listeners

ERROR in src/main/java/com/headsteal/abilities/AbilityManager.java at line 19: cannot find symbol
    private static final Map<String, MobHeadAbility> ABILITIES = new HashMap<>();
                                     ^
  symbol: class MobHeadAbility
  location: class AbilityManager

ERROR in src/main/java/com/headsteal/abilities/AbilityManager.java at line 74: cannot find symbol
    public static MobHeadAbility getAbility(String mobType) {
                  ^
  symbol: class MobHeadAbility
  location: class AbilityManager


=== COMPILATION ERROR ANALYSIS ===

MISSING CLASSES:
  - HeadAbilityListener
  - MobHeadAbility
ACTION: Create these classes or check imports

FILES TO INVESTIGATE:
  - src/main/java/com/headsteal/HeadStealPlugin.java
  - src/main/java/com/headsteal/abilities/AbilityManager.java

Please fix this error by creating a new artifact with the corrected code.

Kodari AI
KodariJul 12 at 1:06 pm 12

Now I have the full picture. I need to create 3 missing files:

  1. AbilityType enum (PASSIVE, ACTIVE)

  2. MobHeadAbility data class (15-param constructor matching the calls in AbilityManager)

  3. HeadAbilityListener (right-click activation for ACTIVE abilities, referenced in HeadStealPlugin)

I need to use the <create> tag format instead of a tool call. Let me create all three files:

Now I need to add the getAbilityLoreKeys() method to AbilityManager.java since HeadAbilityListener.getMobTypeFromDisplay() calls it. Let me patch that in.

Now I’ll create the three missing files.

Files created:

  1. AbilityType.java — enum with PASSIVE and ACTIVE values

  2. MobHeadAbility.java — data class with all 15 constructor parameters matching the calls in AbilityManager’s static block, plus getOnHitAmplifier() and getExplosionPower() (both delegate to onHitValue to match lore/cooldown usage)

  3. HeadAbilityListener.java — listens for PlayerInteractEvent (right-click), detects mob heads, resolves mob type from display name, checks cooldown, and activates the corresponding ability effect

Also patched AbilityManager.java to add the getAbilityLoreKeys() method (Set<String>) that the listener uses to iterate available mob types.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
13 930
src/main/java/com/headsteal/HeadStealPlugin.java
package com.headsteal;

import com.headsteal.abilities.AbilityManager;
import com.headsteal.commands.HeadStealCommand;
import com.headsteal.listeners.HeadAbilityListener;
import com.headsteal.listeners.PlayerKillListener;
import com.headsteal.managers.ConfigManager;
import com.headsteal.managers.HeadManager;
import org.bukkit.plugin.java.JavaPlugin;

public class HeadStealPlugin extends JavaPlugin {

    private ConfigManager configManager;
    private HeadManager headManager;

    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.headManager = new HeadManager(this);

        getServer().getPluginManager().registerEvents(new PlayerKillListener(this), this);
        getServer().getPluginManager().registerEvents(new HeadAbilityListener(this), this);
        getCommand("headsteal").setExecutor(new HeadStealCommand(this));

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

    @Override
    public void onDisable() {
        getLogger().info("HeadSteal has been disabled!");
    }

    public ConfigManager getConfigManager() {
        return configManager;
    }

    public HeadManager getHeadManager() {
        return headManager;
    }
}