Is there a way to detect if a mob is killed as opposed to despawned?
I want to run through a series of commands when a boss is killed, but not if it despawns from setting the game mode to peaceful for example. Is there a way to distinguish between those two?