diff --git a/Resources/config.yml b/Resources/config.yml index af2b7be..2c2e8cc 100644 --- a/Resources/config.yml +++ b/Resources/config.yml @@ -87,4 +87,4 @@ ThrowbackAmount: 0.7 # How fast to throw them back, 0 or lower to disable throwb # e Ops can create all perm commands without special perms # k Ops can create console commands without special perms # -CommandLevels: n +CommandLevels: opchek diff --git a/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java b/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java index 07f1be9..1fc4b0f 100644 --- a/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java +++ b/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java @@ -163,24 +163,21 @@ public class AdvancedPortalsCommand implements CommandExecutor, TabCompleter { executesCommand = true; portalCommand = parseArgVariable(args, i, "command:"); i += this.portalArgsStringLength - 1; - if(portalCommand.startsWith("#") - && !(this.plugin.getSettings().hasCommandLevel("c") - && (sender.hasPermission("advancedportals.createportal.commandlevel.console") - || (this.plugin.getSettings().hasCommandLevel("k") && sender.isOp()) ) )){ + if(portalCommand.startsWith("#") && ((this.plugin.getSettings().hasCommandLevel("c") + && (sender.hasPermission("advancedportals.createportal.commandlevel.console")) + || (this.plugin.getSettings().hasCommandLevel("k") && sender.isOp())))) { player.sendMessage(PluginMessages.customPrefixFail + " You need permission to make a console command portal!"); return true; } - else if(portalCommand.startsWith("!") - && !(this.plugin.getSettings().hasCommandLevel("o") - && (sender.hasPermission("advancedportals.createportal.commandlevel.op") - || (this.plugin.getSettings().hasCommandLevel("h") && sender.isOp()) ) )){ + else if(portalCommand.startsWith("!") && ((this.plugin.getSettings().hasCommandLevel("o") + && (sender.hasPermission("advancedportals.createportal.commandlevel.op")) + || (this.plugin.getSettings().hasCommandLevel("p") && sender.isOp())))) { player.sendMessage(PluginMessages.customPrefixFail + " You need permission to make a op command portal!"); return true; } - else if(portalCommand.startsWith("^") - && !(this.plugin.getSettings().hasCommandLevel("p") - && (sender.hasPermission("advancedportals.createportal.commandlevel.perms") - || (this.plugin.getSettings().hasCommandLevel("e") && sender.isOp()) ) )){ + else if(portalCommand.startsWith("^") && ((this.plugin.getSettings().hasCommandLevel("p") + && (sender.hasPermission("advancedportals.createportal.commandlevel.perms")) + || (this.plugin.getSettings().hasCommandLevel("e") && sender.isOp())))) { player.sendMessage(PluginMessages.customPrefixFail + " You need permission to make a all perms command portal!"); return true; }