Skip to content

Commit 5070f15

Browse files
committed
Use OSX character split on internal sign interface
1 parent c8faf03 commit 5070f15

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java

+11-2
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,18 @@ static class BlockSign implements ISign
588588
@Override
589589
public final String getLine(final int index)
590590
{
591-
return sign.getLine(index).replaceAll("\uF700", "").replaceAll("\uF701", ""); // Mac OSX sends weird chars, ie up and down arrow symbols
591+
StringBuilder builder = new StringBuilder();
592+
for (char c : sign.getLine(index).toCharArray())
593+
{
594+
if (c < 0xF700 || c > 0xF747)
595+
{
596+
builder.append(c);
597+
}
598+
}
599+
return builder.toString();
600+
//return event.getLine(index); // Above code can be removed and replaced with this line when https://github.com/Bukkit/Bukkit/pull/982 is merged.
592601
}
593-
602+
594603
@Override
595604
public final void setLine(final int index, final String text)
596605
{

0 commit comments

Comments
 (0)