1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 09:35:26 +02:00

Protection signs: First check for ownership, then for allowed users.

This commit is contained in:
snowleo
2011-08-19 01:43:39 +02:00
parent 025ecf330d
commit 521f5f6c07

View File

@@ -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;
}