Minecraft How to Test When a Monster Dies?

Da
5

Minecraft How to Test When a Monster Dies?

Ge

What do you mean exactly?

an

There's no command to test this directly. You do it normally like this:

You have to count how many monsters of that kind there are in the given area, and if the number goes down, one has died.

You can also give the monster a name. And then execute a command on the monster using the selector. If the monster no longer exists, the command will not be executed successfully. You can then check this, for example, via SuccessCount. Or: With chain command blocks you can set that they should only be executed if the previous one was successful. So if that is no longer carried out, then the monster no longer exists => died.

gl

With commands or plugins?

Which version?

Da

Command, 21w08b

Da

E.g. A certain monster dies (for example with the tag Monster) and it is written in the chat "You have defeated monster name"