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.SkillType;
|
||||||
import com.gmail.nossr50.skills.Skills;
|
import com.gmail.nossr50.skills.Skills;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
|
import com.gmail.nossr50.util.Permissions;
|
||||||
|
|
||||||
public class SmeltResourceEventHandler {
|
public class SmeltResourceEventHandler {
|
||||||
private SmeltingManager manager;
|
private SmeltingManager manager;
|
||||||
@ -66,9 +67,14 @@ public class SmeltResourceEventHandler {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Permissions.mining(player)) {
|
||||||
Skills.xpProcessing(player, profile, SkillType.MINING, xp / 2);
|
Skills.xpProcessing(player, profile, SkillType.MINING, xp / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Permissions.repair(player)) {
|
||||||
Skills.xpProcessing(player, profile, SkillType.REPAIR, xp / 2);
|
Skills.xpProcessing(player, profile, SkillType.REPAIR, xp / 2);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected void handleBonusSmelts() {
|
protected void handleBonusSmelts() {
|
||||||
ItemStack result = event.getResult();
|
ItemStack result = event.getResult();
|
||||||
|
Loading…
Reference in New Issue
Block a user