Detect what entity killed Player?

Started by JustHaven on Sat, 07/23/2022 - 17:50

Topic category: Help with modding (Java Edition)

Last seen on 22:19, 23. Jul 2022
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Detect what entity killed Player?
Sat, 07/23/2022 - 17:50

I just simply want to do a statement like:

if [Event/target entity] killed by type: (insert mob here)

do (insert code here)

Is there a way to achieve this?