summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/PlayerExtension.java12
2 files changed, 13 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
index f75d57ab6..8cfd6b9c4 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsBlockListener.java
@@ -242,7 +242,7 @@ public class EssentialsBlockListener extends BlockListener
String line = sign.getLine(i);
if (line.startsWith("(") && line.endsWith(")")) {
line = line.substring(1, line.length() - 2);
- if (user.getGroup().equalsIgnoreCase(line)) {
+ if (user.inGroup(line)) {
return ALLOWED;
}
} else if (line.equalsIgnoreCase(user.getName())) {
diff --git a/Essentials/src/com/earth2me/essentials/PlayerExtension.java b/Essentials/src/com/earth2me/essentials/PlayerExtension.java
index 5b7c8bd63..9955a3156 100644
--- a/Essentials/src/com/earth2me/essentials/PlayerExtension.java
+++ b/Essentials/src/com/earth2me/essentials/PlayerExtension.java
@@ -118,6 +118,18 @@ public class PlayerExtension extends PlayerWrapper
return "default";
}
}
+
+ public boolean inGroup(String group)
+ {
+ try
+ {
+ return com.nijikokun.bukkit.Permissions.Permissions.Security.inGroup(getWorld().getName(), getName(), group);
+ }
+ catch (Throwable ex)
+ {
+ return false;
+ }
+ }
public boolean canBuild()
{