Fix for dropping AIR

This commit is contained in:
nossr50 2012-03-01 08:34:56 -08:00
parent e873902e1b
commit dc5b37d560

View File

@ -16,6 +16,7 @@
*/ */
package com.gmail.nossr50.skills; package com.gmail.nossr50.skills;
import org.bukkit.Material;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
@ -42,7 +43,7 @@ public class Unarmed {
public static void disarmProcCheck(Player attacker, Player defender) public static void disarmProcCheck(Player attacker, Player defender)
{ {
int skillLevel = Users.getProfile(attacker).getSkillLevel(SkillType.UNARMED); int skillLevel = Users.getProfile(attacker).getSkillLevel(SkillType.UNARMED);
if(defender.getItemInHand() != null) if(defender.getItemInHand() != null && defender.getItemInHand().getType() != Material.AIR)
{ {
if(skillLevel >= 1000) if(skillLevel >= 1000)
{ {
@ -66,4 +67,4 @@ public class Unarmed {
} }
} }
} }
} }