mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Fix issues from previous merge
This commit is contained in:
parent
33f2ff7e6d
commit
1dc4da8beb
@ -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) {
|
||||
|
@ -1716,18 +1716,8 @@ public class PlotSquared {
|
||||
} catch (IOException ignored) {
|
||||
logger.error("[P2] Failed to save storage.yml");
|
||||
}
|
||||
try {
|
||||
this.commandsFile = new File(folder, "commands.yml");
|
||||
if (!this.commandsFile.exists() && !this.commandsFile.createNewFile()) {
|
||||
logger.error("[P2] Could not create the commands file. Please create 'commands.yml' manually");
|
||||
}
|
||||
this.commands = YamlConfiguration.loadConfiguration(this.commandsFile);
|
||||
} catch (IOException ignored) {
|
||||
logger.error("[P2] Failed to save commands.yml");
|
||||
}
|
||||
try {
|
||||
this.style.save(this.styleFile);
|
||||
this.commands.save(this.commandsFile);
|
||||
} catch (IOException e) {
|
||||
logger.error("[P2] Configuration file saving failed", e);
|
||||
}
|
||||
|
@ -408,7 +408,8 @@ public abstract class PlotArea {
|
||||
prefix = ", ";
|
||||
}
|
||||
}
|
||||
PlotSquared.log(Captions.PREFIX + "&3 - road flags: &7" + roadFlagBuilder.toString());
|
||||
|
||||
logger.info("[P2] - road flags: {}", roadFlagBuilder.toString());
|
||||
|
||||
loadConfiguration(config);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user