public PlayerSaveResult addMapping(UUID uuid, String username) {
        // perform the insert
        String oldUsername = this.lookupMap.put(uuid, username);

        PlayerSaveResultImpl result = PlayerSaveResultImpl.determineBaseResult(username, oldUsername);

        Set<UUID> conflicting = new HashSet<>(this.lookupMap.lookupUuid(username));
        conflicting.remove(uuid);

        if (!conflicting.isEmpty()) {
            // remove the mappings for conflicting uuids
            for (UUID conflict : conflicting) {
                this.lookupMap.remove(conflict);
            }

            result = result.withOtherUuidsPresent(conflicting);
        }

        return result;
    }
Adds a mapping to the cache

@param uuid the uuid of the player
@param username the username of the player
common/src/main/java/me/lucko/luckperms/common/storage/implementation/file/FileUuidCache.java