zander_2007

A plugin witch lets players claim spawn egs of any mob in the game when they right click wile crouching the mob with a lead

Kodari AI
KodariJun 24 at 9:01 am 4
SpawnEggClaimer
A lightweight Minecraft plugin that lets players capture live mobs as spawn eggs. Simply sneak and right-click any mob while holding a lead to receive its spawn egg. The lead is consumed on success. Supports all vanilla mobs with full cross-version compatibility. Includes configurable permissions, toggleable lead consumption, and customizable messages.

Classes planned:

  • SpawnEggClaimerPlugin — main plugin, registers listener

  • MobClaimListener — handles sneak + right-click + lead → spawn egg logic

  • config.yml — messages, toggles, permission node

  • plugin.yml — manifest


How it works:

Step
Action
1
Hold a
Lead
in your main hand
2
Sneak
(shift) and
right-click
any living mob
3
The lead is consumed and you receive the mob’s
Spawn Egg

Config options:

  • permission — set the required permission (or leave empty for all players)

  • consume-lead — set to false if you don’t want the lead to be used up

  • All messages are fully customizable with & color codes and {mob} placeholder

zander_2007

Instead of a dispenser its a redstone lamp that shoots lazer beams

Kodari can make mistakes. Review important code before using.
Files
src
Code
4 138
src/main/java/com/kodari/spawneggclaimer/SpawnEggClaimerPlugin.java
package com.kodari.spawneggclaimer;

import com.kodari.spawneggclaimer.listener.MobClaimListener;
import org.bukkit.plugin.java.JavaPlugin;

public class SpawnEggClaimerPlugin extends JavaPlugin {

    @Override
    public void onEnable() {
        saveDefaultConfig();
        getServer().getPluginManager().registerEvents(new MobClaimListener(this), this);
        getLogger().info("SpawnEggClaimer enabled.");
    }

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