mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 11:14:44 +02:00
Fixed issue with Disarm never working.
This commit is contained in:
@ -43,13 +43,13 @@ public class Unarmed {
|
||||
* @param PPa Profile of the attacking player
|
||||
* @param defender The defending player
|
||||
*/
|
||||
public static void disarmProcCheck(PlayerProfile PPa, Player defender) {
|
||||
public static void disarmProcCheck(Player attacker, Player defender) {
|
||||
final int MAX_BONUS_LEVEL = 1000;
|
||||
|
||||
int skillLevel = PPa.getSkillLevel(SkillType.UNARMED);
|
||||
int skillLevel = Users.getProfile(attacker).getSkillLevel(SkillType.UNARMED);
|
||||
int skillCheck = m.skillCheck(skillLevel, MAX_BONUS_LEVEL);
|
||||
|
||||
if (defender.getItemInHand().getType().equals(Material.AIR)) {
|
||||
if (attacker.getItemInHand().equals(Material.AIR)) {
|
||||
if (random.nextInt(3000) <= skillCheck) {
|
||||
ItemStack item = defender.getItemInHand();
|
||||
|
||||
|
Reference in New Issue
Block a user