// Path: EssentialsBridge/src/main/java/com/earth2me/essentials/utils/StringUtil.java
// public class StringUtil {
//     private static final Pattern INVALIDFILECHARS = Pattern.compile("[^a-z0-9-]");
//     private static final Pattern STRICTINVALIDCHARS = Pattern.compile("[^a-z0-9]");
//     private static final Pattern INVALIDCHARS = Pattern
//             .compile("[^\t\n\r\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFC]");
// 
//     // Used to clean file names before saving to disk
//     public static String sanitizeFileName(final String name) {
//         return INVALIDFILECHARS.matcher(name.toLowerCase(Locale.ENGLISH)).replaceAll("_");
//     }
// 
//     // Used to clean strings/names before saving as filenames/permissions
//     public static String safeString(final String string) {
//         return STRICTINVALIDCHARS.matcher(string.toLowerCase(Locale.ENGLISH)).replaceAll("_");
//     }
// 
//     // Less restrictive string sanitizing, when not used as perm or filename
//     public static String sanitizeString(final String string) {
//         return INVALIDCHARS.matcher(string).replaceAll("");
//     }
// 
//     public static String joinList(Object... list) {
//         return joinList(", ", list);
//     }
// 
//     public static String joinList(String seperator, Object... list) {
//         StringBuilder buf = new StringBuilder();
//         for (Object each : list) {
//             if (buf.length() > 0) {
//                 buf.append(seperator);
//             }
// 
//             if (each instanceof Collection) {
//                 buf.append(joinList(seperator, ((Collection) each).toArray()));
//             } else {
//                 try {
//                     buf.append(each.toString());
//                 } catch (Exception e) {
//                     buf.append(each.toString());
//                 }
//             }
//         }
//         return buf.toString();
//     }
// 
//     public static String joinListSkip(String seperator, String skip, Object... list) {
//         StringBuilder buf = new StringBuilder();
//         for (Object each : list) {
//             if (each.toString().equalsIgnoreCase(skip))
//                 continue;
// 
//             if (buf.length() > 0)
//                 buf.append(seperator);
// 
//             if (each instanceof Collection) {
//                 buf.append(joinListSkip(seperator, skip, ((Collection) each).toArray()));
//             } else {
//                 try {
//                     buf.append(each.toString());
//                 } catch (Exception e) {
//                     buf.append(each.toString());
//                 }
//             }
//         }
//         return buf.toString();
//     }
// 
//     private StringUtil() {
//     }
// }


import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.ExecutionException;
import java.util.regex.Pattern;
import org.bukkit.entity.Player;
import com.earth2me.essentials.utils.StringUtil;
import com.google.common.base.Charsets;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.util.concurrent.UncheckedExecutionException;
import net.ess3.api.IEssentials;
        return Collections.unmodifiableSet(keys);
    }

    public int getUniqueUsers() {
        return keys.size();
    }

    protected ConcurrentSkipListMap<String, UUID> getNames() {
        return names;
    }

    protected ConcurrentSkipListMap<UUID, ArrayList<String>> getHistory() {
        return history;
    }

    public List<String> getUserHistory(final UUID uuid) {
        return history.get(uuid);
    }

    public UUIDMap getUUIDMap() {
        return uuidMap;
    }

    private File getUserFileFromID(final UUID uuid) {
        final File userFolder = new File(ess.getDataFolder(), "userdata");
        return new File(userFolder, uuid.toString() + ".yml");
    }

    public File getUserFileFromString(final String name) {
        final File userFolder = new File(ess.getDataFolder(), "userdata");
// Path: EssentialsBridge/src/main/java/com/earth2me/essentials/utils/StringUtil.java
// public class StringUtil {
//     private static final Pattern INVALIDFILECHARS = Pattern.compile("[^a-z0-9-]");
//     private static final Pattern STRICTINVALIDCHARS = Pattern.compile("[^a-z0-9]");
//     private static final Pattern INVALIDCHARS = Pattern
//             .compile("[^\t\n\r\u0020-\u007E\u0085\u00A0-\uD7FF\uE000-\uFFFC]");
// 
//     // Used to clean file names before saving to disk
//     public static String sanitizeFileName(final String name) {
//         return INVALIDFILECHARS.matcher(name.toLowerCase(Locale.ENGLISH)).replaceAll("_");
//     }
// 
//     // Used to clean strings/names before saving as filenames/permissions
//     public static String safeString(final String string) {
//         return STRICTINVALIDCHARS.matcher(string.toLowerCase(Locale.ENGLISH)).replaceAll("_");
//     }
// 
//     // Less restrictive string sanitizing, when not used as perm or filename
//     public static String sanitizeString(final String string) {
//         return INVALIDCHARS.matcher(string).replaceAll("");
//     }
// 
//     public static String joinList(Object... list) {
//         return joinList(", ", list);
//     }
// 
//     public static String joinList(String seperator, Object... list) {
//         StringBuilder buf = new StringBuilder();
//         for (Object each : list) {
//             if (buf.length() > 0) {
//                 buf.append(seperator);
//             }
// 
//             if (each instanceof Collection) {
//                 buf.append(joinList(seperator, ((Collection) each).toArray()));
//             } else {
//                 try {
//                     buf.append(each.toString());
//                 } catch (Exception e) {
//                     buf.append(each.toString());
//                 }
//             }
//         }
//         return buf.toString();
//     }
// 
//     public static String joinListSkip(String seperator, String skip, Object... list) {
//         StringBuilder buf = new StringBuilder();
//         for (Object each : list) {
//             if (each.toString().equalsIgnoreCase(skip))
//                 continue;
// 
//             if (buf.length() > 0)
//                 buf.append(seperator);
// 
//             if (each instanceof Collection) {
//                 buf.append(joinListSkip(seperator, skip, ((Collection) each).toArray()));
//             } else {
//                 try {
//                     buf.append(each.toString());
//                 } catch (Exception e) {
//                     buf.append(each.toString());
//                 }
//             }
//         }
//         return buf.toString();
//     }
// 
//     private StringUtil() {
//     }
// }


// Path: EssentialsBridge/src/main/java/com/earth2me/essentials/UserMap.java
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.ExecutionException;
import java.util.regex.Pattern;
import org.bukkit.entity.Player;
import com.earth2me.essentials.utils.StringUtil;
import com.google.common.base.Charsets;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.util.concurrent.UncheckedExecutionException;
import net.ess3.api.IEssentials;

        return Collections.unmodifiableSet(keys);
    }

    public int getUniqueUsers() {
        return keys.size();
    }

    protected ConcurrentSkipListMap<String, UUID> getNames() {
        return names;
    }

    protected ConcurrentSkipListMap<UUID, ArrayList<String>> getHistory() {
        return history;
    }

    public List<String> getUserHistory(final UUID uuid) {
        return history.get(uuid);
    }

    public UUIDMap getUUIDMap() {
        return uuidMap;
    }

    private File getUserFileFromID(final UUID uuid) {
        final File userFolder = new File(ess.getDataFolder(), "userdata");
        return new File(userFolder, uuid.toString() + ".yml");
    }

    public File getUserFileFromString(final String name) {
        final File userFolder = new File(ess.getDataFolder(), "userdata");
        return new File(userFolder, StringUtil.sanitizeFileName(name) + ".yml");