diff options
author | KHobbits <rob@khobbits.co.uk> | 2014-01-25 22:55:28 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2014-01-25 22:55:28 +0000 |
commit | 5070f158106e49a69388149709d329e5bac73e57 (patch) | |
tree | 4794344eb53fed792ac578ff63f61c88f66a25cb | |
parent | c8faf03f5b7f1fd88325c30603190ec604c15468 (diff) | |
download | Essentials-5070f158106e49a69388149709d329e5bac73e57.tar Essentials-5070f158106e49a69388149709d329e5bac73e57.tar.gz Essentials-5070f158106e49a69388149709d329e5bac73e57.tar.lz Essentials-5070f158106e49a69388149709d329e5bac73e57.tar.xz Essentials-5070f158106e49a69388149709d329e5bac73e57.zip |
Use OSX character split on internal sign interface
-rw-r--r-- | Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java index 95117e657..0e6d2d47c 100644 --- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java +++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java @@ -588,9 +588,18 @@ public class EssentialsSign @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) { |