mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-25 10:14:42 +02:00
Fix issues from previous merge
This commit is contained in:
@ -933,7 +933,6 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
||||
return perm;
|
||||
}
|
||||
} catch (Throwable ignored) {
|
||||
PlotSquared.debug("No permissions detected!");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -26,14 +26,15 @@
|
||||
package com.plotsquared.bukkit.uuid;
|
||||
|
||||
import com.google.common.util.concurrent.RateLimiter;
|
||||
import com.plotsquared.core.PlotSquared;
|
||||
import com.plotsquared.core.configuration.Captions;
|
||||
import com.plotsquared.core.configuration.Settings;
|
||||
import com.plotsquared.core.uuid.UUIDMapping;
|
||||
import com.plotsquared.core.uuid.UUIDService;
|
||||
import com.sk89q.squirrelid.Profile;
|
||||
import com.sk89q.squirrelid.resolver.HttpRepositoryService;
|
||||
import com.sk89q.squirrelid.resolver.ProfileService;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@ -47,6 +48,8 @@ import java.util.UUID;
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public class SquirrelIdUUIDService implements UUIDService {
|
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger("P2/" + SquirrelIdUUIDService.class.getSimpleName());
|
||||
|
||||
private final ProfileService profileService;
|
||||
private final RateLimiter rateLimiter;
|
||||
|
||||
@ -78,7 +81,9 @@ public class SquirrelIdUUIDService implements UUIDService {
|
||||
// go through them one by one
|
||||
//
|
||||
if (uuids.size() >= 2) {
|
||||
PlotSquared.debug(Captions.PREFIX + "(UUID) Found invalid UUID in batch. Will try each UUID individually.");
|
||||
if (Settings.DEBUG) {
|
||||
logger.info("[P2] (UUID) Found invalid UUID in batch. Will try each UUID individually.");
|
||||
}
|
||||
for (final UUID uuid : uuids) {
|
||||
final List<UUIDMapping> result = this.getNames(Collections.singletonList(uuid));
|
||||
if (result.isEmpty()) {
|
||||
@ -86,8 +91,8 @@ public class SquirrelIdUUIDService implements UUIDService {
|
||||
}
|
||||
results.add(result.get(0));
|
||||
}
|
||||
} else if (uuids.size() == 1) {
|
||||
PlotSquared.debug(Captions.PREFIX + "(UUID) Found invalid UUID: " + uuids.get(0));
|
||||
} else if (uuids.size() == 1 && Settings.DEBUG) {
|
||||
logger.info("[P2] (UUID) Found invalid UUID: {}", uuids.get(0));
|
||||
}
|
||||
}
|
||||
} catch (IOException | InterruptedException e) {
|
||||
|
Reference in New Issue
Block a user