summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorementalo <suror@gmx.co.uk>2011-07-22 14:07:04 +0100
committerementalo <suror@gmx.co.uk>2011-07-22 14:07:04 +0100
commit7b7289db4c8c776c924722e379911defdefdcdd2 (patch)
tree7f2463507c2b660648898bc7493e02b07ba6e258
parentba2b827d7cab1c078a3078f78d32394e3e1f01ea (diff)
downloadEssentials-7b7289db4c8c776c924722e379911defdefdcdd2.tar
Essentials-7b7289db4c8c776c924722e379911defdefdcdd2.tar.gz
Essentials-7b7289db4c8c776c924722e379911defdefdcdd2.tar.lz
Essentials-7b7289db4c8c776c924722e379911defdefdcdd2.tar.xz
Essentials-7b7289db4c8c776c924722e379911defdefdcdd2.zip
Test #725 fix for Protection signs created before 2.5
-rw-r--r--Essentials/src/com/earth2me/essentials/signs/SignProtection.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java
index 4922b3dbb..f988dcb0b 100644
--- a/Essentials/src/com/earth2me/essentials/signs/SignProtection.java
+++ b/Essentials/src/com/earth2me/essentials/signs/SignProtection.java
@@ -9,6 +9,7 @@ import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
@@ -152,12 +153,13 @@ public class SignProtection extends EssentialsSign
{
return SignProtectionState.ALLOWED;
}
- else if (line.equalsIgnoreCase(username))
+ else if (line.equalsIgnoreCase(username)|| line.equalsIgnoreCase(ChatColor.stripColor(username)))
{
return SignProtectionState.ALLOWED;
}
}
- if (sign.getLine(3).substring(2).equalsIgnoreCase(username))
+ String signOwner = sign.getLine(3).substring(2);
+ if (signOwner.equalsIgnoreCase(username) || signOwner.equalsIgnoreCase(ChatColor.stripColor(username)))
{
return SignProtectionState.OWNER;
}