Skip to content

Commit

Permalink
v1.3.0.549 - try to fix long usernames staying on signs
Browse files Browse the repository at this point in the history
  • Loading branch information
slipcor committed Jan 24, 2015
1 parent eb1961d commit bd00871
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.creole
Expand Up @@ -46,6 +46,7 @@ A PVP experience enhancing plugin.

=== Changelog

* v1.3.0.549 - try to fix long usernames staying on signs
* v1.3.0.548 - prevent a NPE
* v1.3.0.547 - call the leave event - I am shocked noone noticed that until yesterday
* v1.3.0.546 - reverse all the things and do what I promised the last 2 commits
Expand Down
8 changes: 8 additions & 0 deletions src/net/slipcor/pvparena/classes/PAClassSign.java
Expand Up @@ -98,6 +98,9 @@ private void remove(final String name) {
if (sign.getLine(i) != null && sign.getLine(i).equals(playerName)) {
sign.setLine(i, "");
}
if (sign.getLine(i) != null && sign.getLine(i).equals(name)) {
sign.setLine(i, "");
}
}
sign.update();
if (location.toLocation().getBlock().getRelative(BlockFace.DOWN)
Expand All @@ -108,10 +111,15 @@ private void remove(final String name) {
if (sign.getLine(i) != null && sign.getLine(i).equals(playerName)) {
sign.setLine(i, "");
}
if (sign.getLine(i) != null && sign.getLine(i).equals(name)) {
sign.setLine(i, "");
}
}
sign.update();
}
} catch (final ClassCastException e) {
} catch (final Exception e) {
e.printStackTrace();
}
}

Expand Down

0 comments on commit bd00871

Please sign in to comment.