O

make that no one can place any spawn eggs it just doesnt let them place it

Kodari AI
KodariJun 11 at 12:27 pm 2
SpawnEggBlocker
A lightweight Minecraft plugin that prevents all players from placing spawn eggs. When a player attempts to use a spawn egg to spawn a mob, the action is silently cancelled. No messages, no bypasses — just a simple, effective block on all spawn egg placement.
O

add that bat spawn egg is held like a sword

Kodari AI
KodariJun 11 at 12:30 pm 5

When a player holds the bat spawn egg, it will visually appear and swing like a sword by swapping it for an invisible-named sword with the same NBT identity, then swapping back on unhold. The cleanest approach here is to give the bat spawn egg item sword-like attack behavior and appearance using PlayerItemHeldEvent — replacing it in-hand with a sword that has a custom model/name, then restoring it when they switch away.

Here’s how it works:

  • When a player switches to a slot holding a BAT_SPAWN_EGG, it’s swapped in-hand with a WOODEN_SWORD named "Bat Spawn Egg" — so it looks and animates like a sword (swing, attack, hold pose).

  • When they switch away, the sword is swapped back to the real bat spawn egg, so the item is preserved correctly in their inventory.

  • The spawn egg placement block still applies to all eggs including bat, so it can never be placed.

O

also make the bat spawn egg always have sharpness 10

Kodari AI
KodariJun 11 at 12:35 pm 3

The disguised bat sword now has Sharpness 10 applied. The enchant glint is hidden with HIDE_ENCHANTS so the item looks clean visually, but the enchantment is fully real — it will deal bonus damage when swung.

O

and make the name Mepe Sword and make when falling high just like a mace it does the same thing and make that when you hit a player it shows mace damage particles in cool patterns and then goes a away

Kodari AI
KodariJun 11 at 12:37 pm 5

Now update the main class to pass this to the listener constructor:

Here’s everything that was added:

  • Name → renamed to Mepe Sword (aqua + bold)

  • Mace fall damage → on EntityDamageByEntityEvent, if the attacker is holding the Mepe Sword and fell from ≥3 blocks, bonus damage is added scaling with fall height — identical formula feel to the mace (fallDistance * 1.5)

  • Hit particles → on every hit with the Mepe Sword, three cool patterns fire off around the victim:

    • 🌊 Spiral — CRIT particles spin outward in 3 rising rings

    • 💥 Burst ring — ENCHANTED_HIT particles explode outward in a flat circle

    • ✨ Rising sparks — FIREWORKS_SPARK shoot upward in a cone

All particle effects are spawned via a short repeating task (45 ticks / ~2 sec) and then stop automatically.

O

fix the particles

Kodari AI
KodariJun 11 at 12:43 pm 11

The issue is SWEEP_ATTACK particles have a different data signature and CRIT/SWEEP_ATTACK don’t visually fire correctly with the current zero-spread call. I’ll replace spawnHitParticles with a proper burst: an expanding ring of CRIT, a second ring of ENCHANTED_HIT offset by half a phase, and rising FIREWORKS_SPARK sparks — all using correct particle call signatures.

Fixed. Changes:

  • Removed SWEEP_ATTACK — it only renders properly when the server fires it natively from a sweep attack, not from manual spawnParticle calls

  • Outer CRIT ring — 20 points expanding outward and rotating as it grows, with a tiny spread so particles aren’t pinpoint-flat

  • Inner ENCHANTED_HIT ring — 12 points counter-rotating at half the radius for a layered spinning look

  • FIREWORKS_SPARK sparks — burst upward every other tick in a small cone for a rising-fire feel

  • All three layers run for 14 ticks (~0.7s) and cancel cleanly

O

and dont change the bat spawn egg to a wooden sword just keep the bat spawn eggs and make the particles on them

Kodari can make mistakes. Review important code before using.
Files
src
Code
3 174
src/main/java/com/kodari/spawneggblocker/SpawnEggBlocker.java
package com.kodari.spawneggblocker;

import org.bukkit.plugin.java.JavaPlugin;

public class SpawnEggBlocker extends JavaPlugin {

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(new SpawnEggListener(this), this);
    }
}