mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-22 15:22:47 +01: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:
parent
09ab981585
commit
0b95a2f417
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user