@Subscribe
	public void onChatMessage(ChatMessage message)
	{
		if (message.getType() == ChatMessageType.LOGINLOGOUTNOTIFICATION && config.showWorldOnLogin())
		{
			MessageNode messageNode = message.getMessageNode();
			// get the player name out of the notification
			String name = messageNode.getValue()
				.substring(0, messageNode.getValue().indexOf(" "));
			ChatPlayer player = findFriend(name);

			if (player != null && player.getWorld() > 0)
			{
				messageNode
					.setValue(messageNode.getValue() + String.format(" (World %d)", player.getWorld()));
			}
		}
	}
@Test
	public void onChatMessage()
	{
		when(config.showWorldOnLogin()).thenReturn(true);

		MessageNode messageNode = mock(MessageNode.class);
		when(messageNode.getValue()).thenReturn("test\u00a0rsn has logged in.");

		ChatMessage chatMessage = new ChatMessage();
		chatMessage.setType(ChatMessageType.LOGINLOGOUTNOTIFICATION);
		chatMessage.setMessageNode(messageNode);

		Friend friend = mock(Friend.class);
		when(friend.getWorld()).thenReturn(311);

		FriendContainer friendContainer = mock(FriendContainer.class);
		when(friendContainer.findByName("test\u00a0rsn")).thenReturn(friend);
		when(client.getFriendContainer()).thenReturn(friendContainer);

		friendListPlugin.onChatMessage(chatMessage);

		verify(messageNode).setValue("test\u00a0rsn has logged in. (World 311)");
	}