Strip all Mac OSX characters

Temporary workaround awaiting PR from Bukkit
This commit is contained in:
Chris Ward 2013-12-08 20:40:10 +11:00
parent 90fc19cc7b
commit f52858d058

View File

@ -507,7 +507,14 @@ public class EssentialsSign
@Override
public final String getLine(final int index)
{
return event.getLine(index).replaceAll("\uF700", "").replaceAll("\uF701", ""); // Mac OSX sends weird chars, ie up and down arrow symbols;
StringBuilder builder = new StringBuilder();
for (char c : event.getLine(index).toCharArray()) {
if (c < 0xF700 || c > 0xF747) {
builder.append(c);
}
}
return builder.toString();
//return event.getLine(index); // Above code can be removed and replaced with this line when https://github.com/Bukkit/Bukkit/pull/982 is merged.
}
@Override