mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-28 19:11:53 +01:00
Strip all Mac OSX characters
Temporary workaround awaiting PR from Bukkit
This commit is contained in:
parent
90fc19cc7b
commit
f52858d058
@ -507,7 +507,14 @@ public class EssentialsSign
|
|||||||
@Override
|
@Override
|
||||||
public final String getLine(final int index)
|
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
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user