mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2026-06-24 03:46:43 +00:00
Ran inspections on code. Fixed compile errors.
This commit is contained in:
@@ -20,7 +20,7 @@ import java.util.UUID;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
/* Credits to evilmidget38 for this class. I modified it to use Gson. */
|
||||
public class NameFetcher implements Callable<Map<UUID, String>> {
|
||||
class NameFetcher implements Callable<Map<UUID, String>> {
|
||||
private static final String PROFILE_URL = "https://sessionserver.mojang.com/session/minecraft/profile/";
|
||||
private final List<UUID> uuids;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.*;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
/* Credits to evilmidget38 for this class. I modified it to use Gson. */
|
||||
public class UUIDFetcher implements Callable<Map<String, UUID>> {
|
||||
class UUIDFetcher implements Callable<Map<String, UUID>> {
|
||||
private static final double PROFILES_PER_REQUEST = 100;
|
||||
private static final String PROFILE_URL = "https://api.mojang.com/profiles/minecraft";
|
||||
private final List<String> names;
|
||||
|
||||
@@ -9,7 +9,6 @@ package com.imaginarycode.minecraft.redisbungee.util;
|
||||
import com.google.common.base.Charsets;
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.imaginarycode.minecraft.redisbungee.RedisBungee;
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -30,8 +29,8 @@ public class UUIDTranslator {
|
||||
private final RedisBungee plugin;
|
||||
private final BiMap<String, UUID> uuidMap = HashBiMap.create();
|
||||
private final ReadWriteLock lock = new ReentrantReadWriteLock();
|
||||
public static final Pattern UUID_PATTERN = Pattern.compile("[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}");
|
||||
public static final Pattern MOJANGIAN_UUID_PATTERN = Pattern.compile("[a-fA-F0-9]{32}");
|
||||
private static final Pattern UUID_PATTERN = Pattern.compile("[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}");
|
||||
private static final Pattern MOJANGIAN_UUID_PATTERN = Pattern.compile("[a-fA-F0-9]{32}");
|
||||
|
||||
public UUID getTranslatedUuid(@NonNull String player, boolean expensiveLookups) {
|
||||
if (ProxyServer.getInstance().getPlayer(player) != null)
|
||||
|
||||
Reference in New Issue
Block a user