changed around the permissions

This commit is contained in:
Alastair 2017-08-06 00:10:06 +01:00
parent 8f5fba9959
commit fbbd104881
2 changed files with 10 additions and 13 deletions

View File

@ -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

View File

@ -163,23 +163,20 @@ 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")
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")
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;