polite.lyf

make a plugin that does is when u kill a mob it drops its head and when u wear its head it will give u some passive and active ablities and for active ablities use left click + shift to activate it and make it balanced

Kodari AI
KodariApr 1 at 2:11 pm 72,237 (v2)
MobHeads
A mob head collection plugin where killing mobs has a chance to drop their custom head. Wearing a mob head on the helmet slot grants unique passive effects (applied every 2 seconds) and an active ability triggered by Sneak + Left-Click. Features 16 mobs with distinct passives (e.g. fire immunity, night vision, arrow boost) and actives (e.g. Blink teleport, Bone Volley, Ghast Fireball). Looting increases drop chance by 2% per level.
  • 16 mob heads, each with a passive (task-applied or event-reactive) and an active ability (shift + LMB, cooldown-tracked)

  • HeadManager owns item creation + PDC tagging; AbilityManager owns cooldowns + all ability logic; AbilityListener handles event-reactive passives

  • Using vanilla skull items for Zombie/Skeleton/Creeper/Wither Skeleton; XSkull+base64 for the rest; XSeries for all effects/sounds/particles

Hereโ€™s a summary of the full plugin:

16 mob heads with balanced drop chances (5โ€“20%), boosted slightly by Looting enchantment (+2%/level):

Head
Passive
Active (Sneak+LMB)
CD
๐ŸงŸ Zombie
Strength I; Strength II+Speed I in darkness
Absorption II + Resistance I (10s)
30s
๐Ÿ’€ Skeleton
+25% arrow damage
Bone Volley โ€“ 5-arrow fan
25s
๐Ÿ•ท Spider
Speed II + Jump Boost I
Venom Strike โ€“ Poison II + Slow II nearby
20s
๐Ÿ•ธ Cave Spider
Poison immune; attacker gets Poison II
Venom Cloud โ€“ Poison III wide area
25s
๐Ÿ’ฅ Creeper
50% explosion resistance
Volatile Burst โ€“ explosion, block-safe
45s
๐Ÿ”ฅ Blaze
Fire immunity
Blaze Burst โ€“ ignite all nearby 10s
30s
๐ŸŒ‘ Enderman
Auto-blink back below 30% HP
Blink โ€“ teleport 15 blocks forward
15s
๐Ÿง™ Witch
Removes Poison/Slowness passively
Hex Brew โ€“ Poison II + Slow II nearby
25s
โ˜  Wither Skeleton
Wither I to anyone who hits you
Withering Nova โ€“ Wither II all nearby
40s
๐Ÿ‘ป Ghast
Permanent Slow Falling
Ghast Tear โ€“ explosive fireball
20s
๐ŸŸข Slime
No fall damage
Slime Launch โ€“ launch straight up
10s
๐ŸŒ‹ Magma Cube
Fire immune + Resistance I
Magma Slam โ€“ damage + blind + ignite
30s
๐Ÿ”ต Guardian
Water Breathing + Conduit Power in water
Laser Beam โ€“ 4 dmg + Mining Fatigue II
40s
๐Ÿ”ท Elder Guardian
Reflect 40% damage to attacker
Elder Curse โ€“ MF III + Weakness II
60s
๐Ÿฆ‡ Phantom
Night Vision
Phantom Phase โ€“ Invisible + Speed III 6s
25s
๐Ÿท Piglin
Strength I + Luck I
Piglin Rally โ€“ Strength II + Speed II + Haste
35s
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
10 899
src/main/java/com/example/mobheads/MobHeadsPlugin.java
package com.example.mobheads;

import com.example.mobheads.listeners.AbilityListener;
import com.example.mobheads.listeners.MobDeathListener;
import com.example.mobheads.managers.AbilityManager;
import com.example.mobheads.managers.HeadManager;
import com.example.mobheads.tasks.PassiveTask;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class MobHeadsPlugin extends JavaPlugin {

    private HeadManager headManager;
    private AbilityManager abilityManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        headManager = new HeadManager(this);
        abilityManager = new AbilityManager(this);
        getServer().getPluginManager().registerEvents(new MobDeathListener(this), this);
        getServer().getPluginManager().registerEvents(new AbilityListener(this), this);
        new PassiveTask(this).runTaskTimer(this, 0L, 40L);
        getLogger().info("MobHeads enabled successfully.");
    }

    @Override
    public void onDisable() {
        getLogger().info("MobHeads disabled.");
    }
}