More permissions murder.

This commit is contained in:
shatteredbeam 2013-02-12 18:06:36 -08:00
parent 163b3d19f9
commit 12a2107601
3 changed files with 7 additions and 10 deletions

View File

@ -9,7 +9,6 @@ import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions;
public class XprateCommand implements CommandExecutor {
private static double originalRate = Config.getInstance().getExperienceGainsGlobalMultiplier();
@ -22,7 +21,7 @@ public class XprateCommand implements CommandExecutor {
return false;
}
if (!Permissions.hasPermission(sender, "mcmmo.commands.xprate.reset")) {
if (!sender.hasPermission("mcmmo.commands.xprate.reset")) {
sender.sendMessage(command.getPermissionMessage());
return true;
}
@ -43,7 +42,7 @@ public class XprateCommand implements CommandExecutor {
return false;
}
if (!Permissions.hasPermission(sender, "mcmmo.commands.xprate.set")) {
if (!sender.hasPermission("mcmmo.commands.xprate.set")) {
sender.sendMessage(command.getPermissionMessage());
return true;
}

View File

@ -11,7 +11,6 @@ import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.utilities.SkillType;
import com.gmail.nossr50.util.Misc;
import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.Users;
public class InspectCommand implements CommandExecutor {
@ -21,7 +20,7 @@ public class InspectCommand implements CommandExecutor {
switch (args.length) {
case 1:
if (!Permissions.hasPermission(sender, "mcmmo.commands.inspect")) {
if (!sender.hasPermission("mcmmo.commands.inspect")) {
sender.sendMessage(command.getPermissionMessage());
return true;
}
@ -37,7 +36,7 @@ public class InspectCommand implements CommandExecutor {
return true;
}
if (sender instanceof Player && !Permissions.inspectOffline((Player) sender)) {
if (sender instanceof Player && !sender.hasPermission("mcmmo.commands.inspect.offline")) {
sender.sendMessage(LocaleLoader.getString("Inspect.Offline"));
return true;
}
@ -68,7 +67,7 @@ public class InspectCommand implements CommandExecutor {
if (sender instanceof Player) {
Player inspector = (Player) sender;
if (!Misc.isNear(inspector.getLocation(), target.getLocation(), 5.0) && !Permissions.inspectFar(inspector)) {
if (!Misc.isNear(inspector.getLocation(), target.getLocation(), 5.0) && !inspector.hasPermission("mcmmo.commands.inspect.far")) {
sender.sendMessage(LocaleLoader.getString("Inspect.TooFar"));
return true;
}

View File

@ -8,7 +8,6 @@ import org.bukkit.entity.Player;
import com.gmail.nossr50.datatypes.McMMOPlayer;
import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.Users;
public class McabilityCommand implements CommandExecutor {
@ -18,7 +17,7 @@ public class McabilityCommand implements CommandExecutor {
switch (args.length) {
case 0:
if (!Permissions.hasPermission(sender, "mcmmo.commands.mcability")) {
if (!sender.hasPermission("mcmmo.commands.mcability")) {
sender.sendMessage(command.getPermissionMessage());
return true;
}
@ -36,7 +35,7 @@ public class McabilityCommand implements CommandExecutor {
return true;
case 1:
if (!Permissions.hasPermission(sender, "mcmmo.commands.mcability.others")) {
if (!sender.hasPermission("mcmmo.commands.mcability.others")) {
sender.sendMessage(command.getPermissionMessage());
return true;
}