Fix the death message when using Summon Wolves

This commit is contained in:
Nate Mortensen 2016-11-21 13:35:08 -07:00 committed by cnr
parent d51d3b2df2
commit ee6e6837ac
2 changed files with 3 additions and 2 deletions

View File

@ -487,8 +487,8 @@ public class CombatManager extends MiniPlugin
if (log.GetAssists() > 0)
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(
cur,
F.main("Death",

View File

@ -86,6 +86,7 @@ public class SpellSummonWolves extends Spell implements SpellClick, SpellClickBl
if (tamer instanceof Player)
{
event.SetDamager((Player) tamer);
event.setMetadata("customWeapon", "Summon Wolves");
event.setKnockbackOrigin(wolf.getLocation());
}
}