@EventHandler (priority = EventPriority.LOW)
	public void onPlayerJoin(PlayerJoinEvent event){
		String playerName, playerGroup, playerWorld;
		Player player;
		player = event.getPlayer();
		playerName = player.getName();
		playerWorld = player.getWorld().getName();
		
		if(xm.getXplayer().hasGroupForWorld(playerName, playerWorld)){
			playerGroup = xm.getXplayer().getGroupForWorld(playerName, playerWorld);
			xm.getXpermissions().setPermissions(player, playerGroup);
		}
		else{
			playerGroup = xm.getXgroup().getDefault(playerWorld);
			if(saveUsersOnJoin()){
				String[] supported = xm.getXgroup().getSupportedWorlds(playerGroup);
				for(int i = 0; i < supported.length; i++){
					xm.getUsers().get().set("users." + playerName + "." + supported[i], playerGroup);
				}
				xm.getUsers().save();
			}
			xm.getXpermissions().setPermissions(player, playerGroup);
		}
		
		if(player.hasPermission("xperms.use")){
			if(!xm.allowedChecking("OnJoin")){
				return;
			}
			boolean update = new UpdateChecker(xm, xm.getVersion()).Check();
			if(update){
				player.sendMessage(ChatColor.DARK_GRAY + "An update is available for Xperms! download it here: " + ChatColor.GREEN + WebsiteURL);
			}
		}
	}