Skip to content

Commit

Permalink
Use OSX character split on internal sign interface
Browse files Browse the repository at this point in the history
  • Loading branch information
khobbits committed Jan 25, 2014
1 parent c8faf03 commit 5070f15
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,18 @@ static class BlockSign implements ISign
@Override
public final String getLine(final int index)
{
return sign.getLine(index).replaceAll("\uF700", "").replaceAll("\uF701", ""); // Mac OSX sends weird chars, ie up and down arrow symbols
StringBuilder builder = new StringBuilder();
for (char c : sign.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
public final void setLine(final int index, final String text)
{
Expand Down

0 comments on commit 5070f15

Please sign in to comment.