mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Fix for dropping AIR
This commit is contained in:
parent
e873902e1b
commit
dc5b37d560
@ -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 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user