dralletje/Chatter — Issue #1: ChatterFormat.parseName() returning string of excessive length
Author: TerrorBite
Created: 2012-01-21 15:39:06+00:00
State: open

Somehow, the parseName() function seems to be returning a formatted string that exceeds the length that setPlayerListName() accepts. Relevant section of stack trace below

15:08:26 [INFO] NightwolfAU2010 [/124.182.4.253:56994] logged in with entity id 3455708 at ([world] -1227.1201687067621, 62.0, 518.4197927570834)
15:08:26 [SEVERE] Could not pass event org.bukkit.event.player.PlayerJoinEvent to Chatter
java.lang.IllegalArgumentException: Player list names can only be a maximum of 16 characters long
at org.bukkit.craftbukkit.entity.CraftPlayer.setPlayerListName(CraftPlayer.java:152)
at com.dral.Chatter.ChatterPlayerListener.onPlayerJoin(ChatterPlayerListener.java:71)

The exception will also be thrown whenever an affected player speaks, as setPlayerListName() is also called at that time. Only players with long usernames seem to be affected.

I see that parseName() has truncation code in it to prevent this situation occurring, however it seems to be not working correctly.