mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-18 12:31:26 +02: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:
@@ -238,13 +238,16 @@ 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);
|
||||||
return ALLOWED;
|
if (line.startsWith("(") && line.endsWith(")")) {
|
||||||
}
|
line = line.substring(1, line.length() - 2);
|
||||||
if (sign.getLine(2).equalsIgnoreCase(user.getName()))
|
if (user.getGroup().equalsIgnoreCase(line)) {
|
||||||
{
|
return ALLOWED;
|
||||||
return ALLOWED;
|
}
|
||||||
|
} else if (line.equalsIgnoreCase(user.getName())) {
|
||||||
|
return ALLOWED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (sign.getLine(3).equalsIgnoreCase(user.getName()))
|
if (sign.getLine(3).equalsIgnoreCase(user.getName()))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user