mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 19:54:44 +02:00
Made xp sharing less ugly by reworking McMMOPlayer xp methods
Notable consequence: checkXP and addLevel in ExperienceAPI are no longer needed and became deprecated
This commit is contained in:
@ -68,11 +68,11 @@ public class SmeltResourceEventHandler {
|
||||
Player player = mcMMOPlayer.getPlayer();
|
||||
|
||||
if (Permissions.mining(player)) {
|
||||
mcMMOPlayer.addXp(SkillType.MINING, xp / 2);
|
||||
mcMMOPlayer.beginXpGain(SkillType.MINING, xp / 2);
|
||||
}
|
||||
|
||||
if (Permissions.repair(player)) {
|
||||
mcMMOPlayer.addXp(SkillType.REPAIR, xp / 2);
|
||||
mcMMOPlayer.beginXpGain(SkillType.REPAIR, xp / 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user