mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-12 01:25:26 +02:00
Protection signs: First check for ownership, then for allowed users.
This commit is contained in:
@@ -146,6 +146,10 @@ public class SignProtection extends EssentialsSign
|
||||
{
|
||||
return SignProtectionState.OWNER;
|
||||
}
|
||||
if (ChatColor.stripColor(sign.getLine(3)).equalsIgnoreCase(username))
|
||||
{
|
||||
return SignProtectionState.OWNER;
|
||||
}
|
||||
for (int i = 1; i <= 2; i++)
|
||||
{
|
||||
final String line = sign.getLine(i);
|
||||
@@ -158,10 +162,6 @@ public class SignProtection extends EssentialsSign
|
||||
return SignProtectionState.ALLOWED;
|
||||
}
|
||||
}
|
||||
if (ChatColor.stripColor(sign.getLine(3)).equalsIgnoreCase(username))
|
||||
{
|
||||
return SignProtectionState.OWNER;
|
||||
}
|
||||
return SignProtectionState.NOT_ALLOWED;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user