diff --git a/src/com/gmail/St3venAU/plugins/ArmorStandTools/ArmorStandGUI.java b/src/com/gmail/St3venAU/plugins/ArmorStandTools/ArmorStandGUI.java index ce85f64..3910056 100644 --- a/src/com/gmail/St3venAU/plugins/ArmorStandTools/ArmorStandGUI.java +++ b/src/com/gmail/St3venAU/plugins/ArmorStandTools/ArmorStandGUI.java @@ -129,7 +129,7 @@ class ArmorStandGUI implements Listener { int slot = event.getRawSlot(); if(slot > i.getSize()) return; if(invSlots.contains(slot)) { - if(plugin.checkPermission(p, as.getLocation().getBlock())) { + if(plugin.checkBlockPermission(p, as.getLocation().getBlock())) { updateInventory(); } else { event.setCancelled(true); @@ -231,7 +231,7 @@ class ArmorStandGUI implements Listener { } } if(invModified) { - if(plugin.checkPermission(p, as.getLocation().getBlock())) { + if(plugin.checkBlockPermission(p, as.getLocation().getBlock())) { updateInventory(); } else { event.setCancelled(true); diff --git a/src/com/gmail/St3venAU/plugins/ArmorStandTools/Main.java b/src/com/gmail/St3venAU/plugins/ArmorStandTools/Main.java index 4bd10f7..48dec45 100644 --- a/src/com/gmail/St3venAU/plugins/ArmorStandTools/Main.java +++ b/src/com/gmail/St3venAU/plugins/ArmorStandTools/Main.java @@ -182,7 +182,7 @@ public class Main extends JavaPlugin { b.setMetadata("setSkull", new FixedMetadataValue(this, true)); } - boolean checkPermission(Player p, Block b) { + boolean checkBlockPermission(Player p, Block b) { if(b == null) return true; if (PlotSquaredHook.api != null) { Location l = b.getLocation(); @@ -190,8 +190,8 @@ public class Main extends JavaPlugin { return PlotSquaredHook.checkPermission(p, l); } } - if(Config.worldGuardPlugin != null && !Config.worldGuardPlugin.canBuild(p, b)) { - return false; + if(Config.worldGuardPlugin != null) { + return Config.worldGuardPlugin.canBuild(p, b); } BlockBreakEvent breakEvent = new BlockBreakEvent(b, p); Bukkit.getServer().getPluginManager().callEvent(breakEvent); @@ -204,6 +204,6 @@ public class Main extends JavaPlugin { } boolean playerHasPermission(Player p, Block b, ArmorStandTool tool) { - return (tool == null || tool.isEnabled() && Utils.hasPermissionNode(p, tool.getPermission())) && checkPermission(p, b); + return (tool == null || tool.isEnabled() && Utils.hasPermissionNode(p, tool.getPermission())) && checkBlockPermission(p, b); } } \ No newline at end of file diff --git a/src/config.yml b/src/config.yml index 15f5bbd..33572c4 100644 --- a/src/config.yml +++ b/src/config.yml @@ -4,7 +4,7 @@ # # Main Config # -# File generated by: v2.02 +# File generated by: v2.03 # (If this is not the version you are running, consider deleting this # config to allow it to be re-created. There may be new config options) # diff --git a/src/language.yml b/src/language.yml index 4ad8c86..fcb1548 100644 --- a/src/language.yml +++ b/src/language.yml @@ -4,7 +4,7 @@ # # Language Config # -# File generated by: v2.02 +# File generated by: v2.03 # (If this is not the version you are running, consider deleting this # config to allow it to be re-created. There may be new config options) # diff --git a/src/plugin.yml b/src/plugin.yml index 17f2f47..b59a92c 100644 --- a/src/plugin.yml +++ b/src/plugin.yml @@ -1,6 +1,6 @@ main: com.gmail.St3venAU.plugins.ArmorStandTools.Main name: ArmorStandTools -version: 2.02 +version: 2.03 author: St3venAU description: Armor stand manipulation tools softdepend: [WorldGuard, PlotSquared]