Add axes and bows to murder detection
This commit is contained in:
parent
fa0fd062d4
commit
7c53feec71
@ -27,7 +27,8 @@ import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
|||||||
|
|
||||||
public class MurderManager extends MiniClientPlugin<WeaklingStatus>
|
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,
|
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.IRON_HELMET, Material.IRON_CHESTPLATE, Material.IRON_LEGGINGS, Material.IRON_BOOTS,
|
||||||
Material.GOLD_HELMET, Material.GOLD_CHESTPLATE, Material.GOLD_LEGGINGS, Material.GOLD_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());
|
Player killer = UtilPlayer.searchExact(combatKiller.GetName());
|
||||||
if (killer != null)
|
if (killer != null)
|
||||||
{
|
{
|
||||||
|
refreshWeaklingStatus(deadPlayer);
|
||||||
|
refreshWeaklingStatus(killer);
|
||||||
if (canMurderOccur(killer, deadPlayer, location) && isWeakling(deadPlayer) && !isWeakling(killer))
|
if (canMurderOccur(killer, deadPlayer, location) && isWeakling(deadPlayer) && !isWeakling(killer))
|
||||||
{
|
{
|
||||||
// Was a murder
|
// Was a murder
|
||||||
|
Loading…
Reference in New Issue
Block a user