mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-30 12:44:45 +02:00
Refixed NPE due to GainXp task
This commit is contained in:
@ -99,7 +99,7 @@ public class Excavation {
|
||||
}
|
||||
|
||||
//Handle XP related tasks
|
||||
PP.addXP(SkillType.EXCAVATION, xp);
|
||||
PP.addXP(player, SkillType.EXCAVATION, xp);
|
||||
Skills.XpCheckSkill(SkillType.EXCAVATION, player);
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class Fishing {
|
||||
FishingTreasure treasure = rewards.get(random.nextInt(rewards.size()));
|
||||
|
||||
if (random.nextDouble() * 100 <= treasure.getDropChance()) {
|
||||
Users.getProfile(player).addXP(SkillType.FISHING, treasure.getXp());
|
||||
Users.getProfile(player).addXP(player, SkillType.FISHING, treasure.getXp());
|
||||
theCatch.setItemStack(treasure.getDrop());
|
||||
}
|
||||
}
|
||||
@ -117,7 +117,7 @@ public class Fishing {
|
||||
theCatch.getItemStack().setDurability((short) (random.nextInt(maxDurability))); //Change durability to random value
|
||||
}
|
||||
|
||||
PP.addXP(SkillType.FISHING, Config.getInstance().getFishingBaseXP());
|
||||
PP.addXP(player, SkillType.FISHING, Config.getInstance().getFishingBaseXP());
|
||||
Skills.XpCheckSkill(SkillType.FISHING, player);
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ public class Herbalism {
|
||||
}
|
||||
}
|
||||
|
||||
PP.addXP(SkillType.HERBALISM, xp);
|
||||
PP.addXP(player, SkillType.HERBALISM, xp);
|
||||
Skills.XpCheckSkill(SkillType.HERBALISM, player);
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ public class Mining {
|
||||
break;
|
||||
}
|
||||
|
||||
PP.addXP(SkillType.MINING, xp);
|
||||
PP.addXP(player, SkillType.MINING, xp);
|
||||
Skills.XpCheckSkill(SkillType.MINING, player);
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ public class WoodCutting {
|
||||
}
|
||||
|
||||
if (Permissions.getInstance().woodcutting(player)) {
|
||||
PP.addXP(SkillType.WOODCUTTING, xp); //Tree Feller gives nerf'd XP
|
||||
PP.addXP(player, SkillType.WOODCUTTING, xp); //Tree Feller gives nerf'd XP
|
||||
Skills.XpCheckSkill(SkillType.WOODCUTTING, player);
|
||||
}
|
||||
}
|
||||
@ -322,7 +322,7 @@ public class WoodCutting {
|
||||
}
|
||||
|
||||
WoodCutting.woodCuttingProcCheck(player, block);
|
||||
PP.addXP(SkillType.WOODCUTTING, xp);
|
||||
PP.addXP(player, SkillType.WOODCUTTING, xp);
|
||||
Skills.XpCheckSkill(SkillType.WOODCUTTING, player);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user