fixed inverted command level issue

This commit is contained in:
sekwah41 2017-12-18 02:29:13 +00:00
parent efe03d29aa
commit 2096698b52
3 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
main: com.sekwah.advancedportals.AdvancedPortalsPlugin
name: AdvancedPortals
version: 0.0.36
version: 0.0.37
author: sekwah41
description: An advanced portals plugin for bukkit.
commands:

View File

@ -16,7 +16,7 @@
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<version>0.0.36-snapshot</version>
<version>0.0.37-snapshot</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>

View File

@ -169,21 +169,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")
if(portalCommand.startsWith("#") && !(this.plugin.getSettings().hasCommandLevel("c")
&& (sender.hasPermission("advancedportals.createportal.commandlevel.console"))
|| (this.plugin.getSettings().hasCommandLevel("k") && sender.isOp())))) {
|| (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")
else if(portalCommand.startsWith("!") && !(this.plugin.getSettings().hasCommandLevel("o")
&& (sender.hasPermission("advancedportals.createportal.commandlevel.op"))
|| (this.plugin.getSettings().hasCommandLevel("p") && sender.isOp())))) {
|| (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")
else if(portalCommand.startsWith("^") && !(this.plugin.getSettings().hasCommandLevel("p")
&& (sender.hasPermission("advancedportals.createportal.commandlevel.perms"))
|| (this.plugin.getSettings().hasCommandLevel("e") && sender.isOp())))) {
|| (this.plugin.getSettings().hasCommandLevel("e") && sender.isOp()))) {
player.sendMessage(PluginMessages.customPrefixFail + " You need permission to make a all perms command portal!");
return true;
}