3
0
Mirror von https://github.com/St3venAU/ArmorStandTools.git synchronisiert 2024-12-28 20:40:12 +01:00

v2.03 - bugfixes

Dieser Commit ist enthalten in:
St3venAU 2015-04-16 16:57:55 +08:00
Ursprung ac8664950b
Commit a2970b977b
5 geänderte Dateien mit 9 neuen und 9 gelöschten Zeilen

Datei anzeigen

@ -129,7 +129,7 @@ class ArmorStandGUI implements Listener {
int slot = event.getRawSlot(); int slot = event.getRawSlot();
if(slot > i.getSize()) return; if(slot > i.getSize()) return;
if(invSlots.contains(slot)) { if(invSlots.contains(slot)) {
if(plugin.checkPermission(p, as.getLocation().getBlock())) { if(plugin.checkBlockPermission(p, as.getLocation().getBlock())) {
updateInventory(); updateInventory();
} else { } else {
event.setCancelled(true); event.setCancelled(true);
@ -231,7 +231,7 @@ class ArmorStandGUI implements Listener {
} }
} }
if(invModified) { if(invModified) {
if(plugin.checkPermission(p, as.getLocation().getBlock())) { if(plugin.checkBlockPermission(p, as.getLocation().getBlock())) {
updateInventory(); updateInventory();
} else { } else {
event.setCancelled(true); event.setCancelled(true);

Datei anzeigen

@ -182,7 +182,7 @@ public class Main extends JavaPlugin {
b.setMetadata("setSkull", new FixedMetadataValue(this, true)); 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(b == null) return true;
if (PlotSquaredHook.api != null) { if (PlotSquaredHook.api != null) {
Location l = b.getLocation(); Location l = b.getLocation();
@ -190,8 +190,8 @@ public class Main extends JavaPlugin {
return PlotSquaredHook.checkPermission(p, l); return PlotSquaredHook.checkPermission(p, l);
} }
} }
if(Config.worldGuardPlugin != null && !Config.worldGuardPlugin.canBuild(p, b)) { if(Config.worldGuardPlugin != null) {
return false; return Config.worldGuardPlugin.canBuild(p, b);
} }
BlockBreakEvent breakEvent = new BlockBreakEvent(b, p); BlockBreakEvent breakEvent = new BlockBreakEvent(b, p);
Bukkit.getServer().getPluginManager().callEvent(breakEvent); Bukkit.getServer().getPluginManager().callEvent(breakEvent);
@ -204,6 +204,6 @@ public class Main extends JavaPlugin {
} }
boolean playerHasPermission(Player p, Block b, ArmorStandTool tool) { 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);
} }
} }

Datei anzeigen

@ -4,7 +4,7 @@
# #
# Main Config # Main Config
# #
# File generated by: v2.02 # File generated by: v2.03
# (If this is not the version you are running, consider deleting this # (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) # config to allow it to be re-created. There may be new config options)
# #

Datei anzeigen

@ -4,7 +4,7 @@
# #
# Language Config # Language Config
# #
# File generated by: v2.02 # File generated by: v2.03
# (If this is not the version you are running, consider deleting this # (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) # config to allow it to be re-created. There may be new config options)
# #

Datei anzeigen

@ -1,6 +1,6 @@
main: com.gmail.St3venAU.plugins.ArmorStandTools.Main main: com.gmail.St3venAU.plugins.ArmorStandTools.Main
name: ArmorStandTools name: ArmorStandTools
version: 2.02 version: 2.03
author: St3venAU author: St3venAU
description: Armor stand manipulation tools description: Armor stand manipulation tools
softdepend: [WorldGuard, PlotSquared] softdepend: [WorldGuard, PlotSquared]