Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 132
    • Issues 132
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Issues
  • #1760

Closed
Open
Created Nov 02, 2024 by Clexus@Clexus

~onKill trigger for MythicMobs

Summary

An ~onKill trigger

Usage

Example: a zombie killed another mob, then infect it into a zombie

Value

Very important, why there's only ~onKillPlayer?

Priority

High, and it's not very hard for adding it

Implementation

In versions lower than 1.20.6

EntityDeathEvent -> getLastDamageCause -> instanceof EntityDamageByEntityEvent -> if true, getDamager() -> killer is the mob

Higher:

EntityDeathEvent -> getDamageSource -> blabla -> killer is the mob

Edited Nov 02, 2024 by Clexus
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking