mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-09 16:17:37 +02:00
[trunk] Groups for Protection signs.
Group inheritance. git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1213 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
@@ -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())) {
|
||||
|
@@ -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()
|
||||
{
|
||||
|
Reference in New Issue
Block a user