Skip to content

Commit

Permalink
Permissions class removed from mcMMOPlayer.
Browse files Browse the repository at this point in the history
  • Loading branch information
shatteredbeam committed Feb 15, 2013
1 parent bf4d70e commit 476ea80
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main/java/com/gmail/nossr50/datatypes/McMMOPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import com.gmail.nossr50.skills.utilities.SkillType;
import com.gmail.nossr50.spout.huds.SpoutHud;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions;

public class McMMOPlayer {
private Player player;
Expand Down Expand Up @@ -142,19 +141,19 @@ private int modifyXpGain(SkillType skillType, int xp) {
}

// TODO: Too many permission checks here, is there no way to avoid that?
if (Permissions.xpQuadruple(player)) {
if (player.hasPermission("mcmmo.perks.xp.quadruple")) {
xp *= 4;
}
else if (Permissions.xpTriple(player)) {
else if (player.hasPermission("mcmmo.perks.xp.triple")) {
xp *= 3;
}
else if (Permissions.xpDoubleAndOneHalf(player)) {
else if (player.hasPermission("mcmmo.perks.xp.150percentboost")) {
xp *= 2.5;
}
else if (Permissions.xpDouble(player)) {
else if (player.hasPermission("mcmmo.perks.xp.150percentboost")) {
xp *= 2;
}
else if (Permissions.xpOneAndOneHalf(player)) {
else if (player.hasPermission("mcmmo.perks.xp.50percentboost")) {
xp *= 1.5;
}

Expand Down

0 comments on commit 476ea80

Please sign in to comment.