mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +01:00
[trunk] Groups for Protection signs.
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1206 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
a9a178466c
commit
76dda664d7
@ -238,14 +238,17 @@ public class EssentialsBlockListener extends BlockListener
|
|||||||
Sign sign = new CraftSign(block);
|
Sign sign = new CraftSign(block);
|
||||||
if (sign.getLine(0).equalsIgnoreCase("§1[Protection]") && !user.isAuthorized("essentials.signs.protection.override"))
|
if (sign.getLine(0).equalsIgnoreCase("§1[Protection]") && !user.isAuthorized("essentials.signs.protection.override"))
|
||||||
{
|
{
|
||||||
if (sign.getLine(1).equalsIgnoreCase(user.getName()))
|
for (int i = 1; i <= 2; i++) {
|
||||||
{
|
String line = sign.getLine(i);
|
||||||
|
if (line.startsWith("(") && line.endsWith(")")) {
|
||||||
|
line = line.substring(1, line.length() - 2);
|
||||||
|
if (user.getGroup().equalsIgnoreCase(line)) {
|
||||||
return ALLOWED;
|
return ALLOWED;
|
||||||
}
|
}
|
||||||
if (sign.getLine(2).equalsIgnoreCase(user.getName()))
|
} else if (line.equalsIgnoreCase(user.getName())) {
|
||||||
{
|
|
||||||
return ALLOWED;
|
return ALLOWED;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (sign.getLine(3).equalsIgnoreCase(user.getName()))
|
if (sign.getLine(3).equalsIgnoreCase(user.getName()))
|
||||||
{
|
{
|
||||||
return ALLOWED;
|
return ALLOWED;
|
||||||
|
Loading…
Reference in New Issue
Block a user