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 2690696712
commit a53d8ddef1

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