Programming minecraft plugin to catch animals?

Di
- in Plugins
3

I have a small Minecraft server with a few friends to increase the fun of the game. If I write a plugin with a few extra functions, we come to my problem:

I would like to be able to craft a new item (I already have that) and would like that when I right-click an animal with it, the item turns into a spawnegg for the respective animal.

The point: catch animals (and monsters) so that you can do them in Spawner.

Po

I don't understand exactly what your question is…

Do you want to have such a plugin programmed now?

fo

The way i j noticed that it means that he wants to know how it works.

Di

Yes, I want to know how to program that. So how to query the animal and then get the corresponding spawnei