From 2096698b526d5226c83760931ea3f4111d9518a9 Mon Sep 17 00:00:00 2001 From: sekwah41 Date: Mon, 18 Dec 2017 02:29:13 +0000 Subject: [PATCH] fixed inverted command level issue --- Resources/plugin.yml | 2 +- pom.xml | 2 +- .../advancedportals/AdvancedPortalsCommand.java | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Resources/plugin.yml b/Resources/plugin.yml index 0c558722..e3014d91 100644 --- a/Resources/plugin.yml +++ b/Resources/plugin.yml @@ -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: diff --git a/pom.xml b/pom.xml index 2247930c..4dabf8bc 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - 0.0.36-snapshot + 0.0.37-snapshot UTF-8 1.7 diff --git a/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java b/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java index af1706eb..8254d3fc 100644 --- a/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java +++ b/src/com/sekwah/advancedportals/AdvancedPortalsCommand.java @@ -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; }