@EventHandler
    public void onPlayerChat(AsyncPlayerChatEvent event)
    {
        Player player = event.getPlayer();
        if(plugin.config.getBoolean("Apply.Enabled"))
        {
            String group = plugin.config.getString("Apply.Group");
            if(plugin.config.getBoolean("Apply.Mute") && !player.hasPermission("MasterPromote.member"))
            {
                event.setCancelled(true);
                String msg = plugin.messages.getString("Mute").replace("&", "\247");
                String msg1 = msg.replace("<player>", player.getName());
                String msg2 = msg1.replace("<group>", group);
                player.sendMessage(msg2);
            }
        }
        if(plugin.config.getBoolean("Apply.BlockPWinChat"))
        {
        	if(!player.hasPermission("MasterPromote.canwritepassword"))
        	{
        		if(event.getMessage().contains(plugin.config.getString("Apply.Password")))
        		{
        			event.setMessage(event.getMessage().replace(plugin.config.getString("Apply.Password"), "*****"));
        		}
        	}
        }
    }