diff --git a/pom.xml b/pom.xml
index 648642109..794bd33fa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
UTF-8
PlotSquared
- 3.1.1
+ 3.1.2
PlotSquared
jar
diff --git a/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java b/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java
index 7cd8ef525..f39b45fa7 100644
--- a/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java
+++ b/src/main/java/com/plotsquared/bukkit/object/BukkitPlayer.java
@@ -19,6 +19,7 @@ import com.intellectualcrafters.plot.object.Location;
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.util.EconHandler;
import com.intellectualcrafters.plot.util.MainUtil;
+import com.intellectualcrafters.plot.util.MathMan;
import com.intellectualcrafters.plot.util.PlotGamemode;
import com.intellectualcrafters.plot.util.PlotWeather;
import com.intellectualcrafters.plot.util.UUIDHandler;
@@ -83,19 +84,18 @@ public class BukkitPlayer extends PlotPlayer {
}
boolean value = this.player.hasPermission(node);
if (!value) {
- Permission perm = Bukkit.getServer().getPluginManager().getPermission(node);
- if (perm == null) {
- perm = new Permission(node, PermissionDefault.FALSE);
- Map children = perm.getChildren();
-
- final String[] nodes = node.split("\\.");
+ final String[] nodes = node.split("\\.");
+ if (!MathMan.isInteger(nodes[nodes.length - 1])) {
final StringBuilder n = new StringBuilder();
for (int i = 0; i < (nodes.length - 1); i++) {
n.append(nodes[i] + ("."));
- children.put(n + C.PERMISSION_STAR.s(), true);
+ if (!node.equals(n + C.PERMISSION_STAR.s())) {
+ value = player.hasPermission(n + C.PERMISSION_STAR.s());
+ if (value) {
+ break;
+ }
+ }
}
- Bukkit.getServer().getPluginManager().addPermission(perm);
- Bukkit.getServer().getPluginManager().recalculatePermissionDefaults(perm);
value = this.player.hasPermission(node);
}
}
diff --git a/target/PlotSquared-Bukkit.jar b/target/PlotSquared-Bukkit.jar
index 17c56ccab..817945970 100644
Binary files a/target/PlotSquared-Bukkit.jar and b/target/PlotSquared-Bukkit.jar differ
diff --git a/target/PlotSquared-Sponge.jar b/target/PlotSquared-Sponge.jar
index f6468e143..a5c1bd56a 100644
Binary files a/target/PlotSquared-Sponge.jar and b/target/PlotSquared-Sponge.jar differ