3
0
Mirror von https://github.com/St3venAU/ArmorStandTools.git synchronisiert 2024-12-28 04:20:08 +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();
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);

Datei anzeigen

@ -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);
}
}

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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