mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 08:39:49 +01:00
Fix bug where smelting allowed for XP gain in Mining/Repair even if
permissions were not present.
This commit is contained in:
parent
4692a461eb
commit
56e16acce4
@ -10,6 +10,7 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.skills.SkillType;
|
||||
import com.gmail.nossr50.skills.Skills;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
|
||||
public class SmeltResourceEventHandler {
|
||||
private SmeltingManager manager;
|
||||
@ -66,8 +67,13 @@ public class SmeltResourceEventHandler {
|
||||
break;
|
||||
}
|
||||
|
||||
Skills.xpProcessing(player, profile, SkillType.MINING, xp / 2);
|
||||
Skills.xpProcessing(player, profile, SkillType.REPAIR, xp / 2);
|
||||
if (Permissions.mining(player)) {
|
||||
Skills.xpProcessing(player, profile, SkillType.MINING, xp / 2);
|
||||
}
|
||||
|
||||
if (Permissions.repair(player)) {
|
||||
Skills.xpProcessing(player, profile, SkillType.REPAIR, xp / 2);
|
||||
}
|
||||
}
|
||||
|
||||
protected void handleBonusSmelts() {
|
||||
|
Loading…
Reference in New Issue
Block a user