Fix the death message when using Summon Wolves
This commit is contained in:
parent
1425a2aaed
commit
abbb46ec0a
@ -487,8 +487,8 @@ public class CombatManager extends MiniPlugin
|
|||||||
if (log.GetAssists() > 0)
|
if (log.GetAssists() > 0)
|
||||||
killPlayer += " + " + log.GetAssists();
|
killPlayer += " + " + log.GetAssists();
|
||||||
|
|
||||||
String weapon = log.GetKiller().GetLastDamageSource();
|
String weapon = (String) log.GetKiller().GetDamage().getFirst().getMetadata().get("customWeapon");
|
||||||
|
weapon = weapon == null ? log.GetKiller().GetLastDamageSource() : weapon;
|
||||||
UtilPlayer.message(
|
UtilPlayer.message(
|
||||||
cur,
|
cur,
|
||||||
F.main("Death",
|
F.main("Death",
|
||||||
|
@ -86,6 +86,7 @@ public class SpellSummonWolves extends Spell implements SpellClick, SpellClickBl
|
|||||||
if (tamer instanceof Player)
|
if (tamer instanceof Player)
|
||||||
{
|
{
|
||||||
event.SetDamager((Player) tamer);
|
event.SetDamager((Player) tamer);
|
||||||
|
event.setMetadata("customWeapon", "Summon Wolves");
|
||||||
event.setKnockbackOrigin(wolf.getLocation());
|
event.setKnockbackOrigin(wolf.getLocation());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user