public void updatePlayers() {
		for (Client c : clients) {
			if (c.loggedIn) {
				ChannelBuffer updateBlock = ChannelBuffers.dynamicBuffer();
				updateBlock.writeByte(1);
				updateBlock.writeByte(c.updateFlags);

				if ((c.updateFlags & 0x1) == 0x1) {
					List<Message> messages = World.getWorld().getMessages();
					updateBlock.writeByte(messages.size() - c.lastMessage);
					for (int i = c.lastMessage; i < messages.size(); i++) {
						Message message = messages.get(i);
						byte[] usernameBytes = message.getClient().username.getBytes();
						updateBlock.writeByte(usernameBytes.length);
						updateBlock.writeBytes(usernameBytes);
						byte[] messageBytes = (message.getMessage()).getBytes();
						updateBlock.writeInt(messageBytes.length);
						updateBlock.writeBytes(messageBytes);
						updateBlock.writeByte(message.getType());
					}
					c.lastMessage = messages.size();
				}
				c.getChannel().write(updateBlock);
				c.updateFlags = 0;
			}
		}
	}