Add axes and bows to murder detection

This commit is contained in:
Shaun Bennett 2015-08-30 17:59:46 -07:00
parent fa0fd062d4
commit 7c53feec71

View File

@ -27,7 +27,8 @@ import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
public class MurderManager extends MiniClientPlugin<WeaklingStatus>
{
private final Material[] weapons = { Material.WOOD_SWORD, Material.STONE_SWORD, Material.IRON_SWORD, Material.DIAMOND_SWORD };
private final Material[] weapons = { Material.WOOD_SWORD, Material.STONE_SWORD, Material.IRON_SWORD, Material.DIAMOND_SWORD,
Material.WOOD_AXE, Material.STONE_AXE, Material.IRON_AXE, Material.DIAMOND_AXE, Material.BOW };
private final Material[] armour = { Material.LEATHER_HELMET, Material.LEATHER_CHESTPLATE, Material.LEATHER_LEGGINGS, Material.LEATHER_BOOTS,
Material.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS,
Material.GOLD_HELMET, Material.GOLD_CHESTPLATE, Material.GOLD_LEGGINGS, Material.GOLD_BOOTS,
@ -58,6 +59,8 @@ public class MurderManager extends MiniClientPlugin<WeaklingStatus>
Player killer = UtilPlayer.searchExact(combatKiller.GetName());
if (killer != null)
{
refreshWeaklingStatus(deadPlayer);
refreshWeaklingStatus(killer);
if (canMurderOccur(killer, deadPlayer, location) && isWeakling(deadPlayer) && !isWeakling(killer))
{
// Was a murder