@EventHandler 
	public void onAsyncPlayerChat(AsyncPlayerChatEvent event){

		String msg = event.getMessage().replaceAll("^[ ]*\\*", "*");
		String[] messageArray = format(event.getPlayer(), msg, msg.startsWith("*")).split(" ");
		String newMessage = "";

		JsonMessage message = new JsonMessage("");
		for (String x : messageArray) {
			
			if(this.isUrl(x)) {
				
				if (!CatChat.hasPerms(event.getPlayer(), "catchat.links")) {
				
					newMessage = newMessage + ChatColor.RED + "<censored> ";
					continue;
				}else {
					
					message.append(new JsonUrlEvent(ChatColor.GREEN + "<link> ", x));
				}
			} else {

				newMessage += x + " ";
				message.append(new JsonText(Symbols.getSmiley(x) + " "));
				continue;
			}
		}

		Player player = event.getPlayer();
		System.out.println(newMessage);
		//if starts with *, then channel chat
		if (newMessage.startsWith("^[ ]*\\*")) {
			Channel channel = plugin.getChannelHandler().getChannel(player);

			if (channel == null) {
				newMessage.replaceAll("^[ ]*\\*", "");
			} else {
				event.getRecipients().retainAll(plugin.getChannelHandler().getPlayers(player));
			}
		}
		
		//System.out.println(message.getObject().toJSONString());
		for (Player recepient : event.getRecipients()) {
			IChatBaseComponent comp = ChatSerializer.a(message.getObject().toJSONString());
	        PacketPlayOutChat packet = new PacketPlayOutChat(comp, true);
	        ((CraftPlayer) recepient).getHandle().playerConnection.sendPacket(packet);
		}
		event.setCancelled(true);
	}