mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 06:36:44 +01:00
Prefix all log messages
This commit is contained in:
parent
d648a6d3db
commit
6664d49928
@ -225,12 +225,12 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (PremiumVerification.isPremium()) {
|
if (PremiumVerification.isPremium()) {
|
||||||
logger.info("PlotSquared version licensed to Spigot user {}", getUserID());
|
logger.info("[P2] PlotSquared version licensed to Spigot user {}", getUserID());
|
||||||
logger.info("https://www.spigotmc.org/resources/{}", getResourceID());
|
logger.info("[P2] https://www.spigotmc.org/resources/{}", getResourceID());
|
||||||
logger.info("Download ID: {}", getDownloadID());
|
logger.info("[P2] Download ID: {}", getDownloadID());
|
||||||
logger.info("Thanks for supporting us :)");
|
logger.info("[P2] Thanks for supporting us :)");
|
||||||
} else {
|
} else {
|
||||||
logger.info("Couldn't verify purchase :(");
|
logger.info("[P2] Couldn't verify purchase :(");
|
||||||
}
|
}
|
||||||
|
|
||||||
final UUIDPipeline impromptuPipeline = PlotSquared.get().getImpromptuUUIDPipeline();
|
final UUIDPipeline impromptuPipeline = PlotSquared.get().getImpromptuUUIDPipeline();
|
||||||
@ -250,7 +250,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
final OfflineModeUUIDService offlineModeUUIDService = new OfflineModeUUIDService();
|
final OfflineModeUUIDService offlineModeUUIDService = new OfflineModeUUIDService();
|
||||||
impromptuPipeline.registerService(offlineModeUUIDService);
|
impromptuPipeline.registerService(offlineModeUUIDService);
|
||||||
backgroundPipeline.registerService(offlineModeUUIDService);
|
backgroundPipeline.registerService(offlineModeUUIDService);
|
||||||
logger.info("(UUID) Using the offline mode UUID service");
|
logger.info("[P2] (UUID) Using the offline mode UUID service");
|
||||||
}
|
}
|
||||||
|
|
||||||
final OfflinePlayerUUIDService offlinePlayerUUIDService = new OfflinePlayerUUIDService();
|
final OfflinePlayerUUIDService offlinePlayerUUIDService = new OfflinePlayerUUIDService();
|
||||||
@ -270,7 +270,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
final LuckPermsUUIDService luckPermsUUIDService;
|
final LuckPermsUUIDService luckPermsUUIDService;
|
||||||
if (Bukkit.getPluginManager().getPlugin("LuckPerms") != null) {
|
if (Bukkit.getPluginManager().getPlugin("LuckPerms") != null) {
|
||||||
luckPermsUUIDService = new LuckPermsUUIDService();
|
luckPermsUUIDService = new LuckPermsUUIDService();
|
||||||
logger.info("(UUID) Using LuckPerms as a complementary UUID service");
|
logger.info("[P2] (UUID) Using LuckPerms as a complementary UUID service");
|
||||||
} else {
|
} else {
|
||||||
luckPermsUUIDService = null;
|
luckPermsUUIDService = null;
|
||||||
}
|
}
|
||||||
@ -278,7 +278,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
final BungeePermsUUIDService bungeePermsUUIDService;
|
final BungeePermsUUIDService bungeePermsUUIDService;
|
||||||
if (Bukkit.getPluginManager().getPlugin("BungeePerms") != null) {
|
if (Bukkit.getPluginManager().getPlugin("BungeePerms") != null) {
|
||||||
bungeePermsUUIDService = new BungeePermsUUIDService();
|
bungeePermsUUIDService = new BungeePermsUUIDService();
|
||||||
logger.info("(UUID) Using BungeePerms as a complementary UUID service");
|
logger.info("[P2] (UUID) Using BungeePerms as a complementary UUID service");
|
||||||
} else {
|
} else {
|
||||||
bungeePermsUUIDService = null;
|
bungeePermsUUIDService = null;
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
final EssentialsUUIDService essentialsUUIDService;
|
final EssentialsUUIDService essentialsUUIDService;
|
||||||
if (Bukkit.getPluginManager().getPlugin("Essentials") != null) {
|
if (Bukkit.getPluginManager().getPlugin("Essentials") != null) {
|
||||||
essentialsUUIDService = new EssentialsUUIDService();
|
essentialsUUIDService = new EssentialsUUIDService();
|
||||||
logger.info("(UUID) Using Essentials as a complementary UUID service");
|
logger.info("[P2] (UUID) Using Essentials as a complementary UUID service");
|
||||||
} else {
|
} else {
|
||||||
essentialsUUIDService = null;
|
essentialsUUIDService = null;
|
||||||
}
|
}
|
||||||
@ -297,7 +297,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
final PaperUUIDService paperUUIDService = new PaperUUIDService();
|
final PaperUUIDService paperUUIDService = new PaperUUIDService();
|
||||||
impromptuPipeline.registerService(paperUUIDService);
|
impromptuPipeline.registerService(paperUUIDService);
|
||||||
backgroundPipeline.registerService(paperUUIDService);
|
backgroundPipeline.registerService(paperUUIDService);
|
||||||
logger.info("(UUID) Using Paper as a complementary UUID service");
|
logger.info("[P2] (UUID) Using Paper as a complementary UUID service");
|
||||||
}
|
}
|
||||||
|
|
||||||
impromptuPipeline.registerService(sqLiteUUIDService);
|
impromptuPipeline.registerService(sqLiteUUIDService);
|
||||||
@ -350,9 +350,9 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
if (Settings.Enabled_Components.EXTERNAL_PLACEHOLDERS) {
|
if (Settings.Enabled_Components.EXTERNAL_PLACEHOLDERS) {
|
||||||
ChatFormatter.formatters.add(new PlaceholderFormatter());
|
ChatFormatter.formatters.add(new PlaceholderFormatter());
|
||||||
}
|
}
|
||||||
logger.info("PlotSquared hooked into PlaceholderAPI");
|
logger.info("[P2] PlotSquared hooked into PlaceholderAPI");
|
||||||
} else {
|
} else {
|
||||||
logger.info("PlaceholderAPI is not in use. Hook deactivated");
|
logger.info("[P2] PlaceholderAPI is not in use. Hook deactivated");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.startMetrics();
|
this.startMetrics();
|
||||||
@ -368,8 +368,8 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
try {
|
try {
|
||||||
this.backupManager = new SimpleBackupManager();
|
this.backupManager = new SimpleBackupManager();
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to initialize backup manager", e);
|
logger.error("[P2] Failed to initialize backup manager", e);
|
||||||
logger.error("Backup features will be disabled");
|
logger.error("[P2] Backup features will be disabled");
|
||||||
this.backupManager = new NullBackupManager();
|
this.backupManager = new NullBackupManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
this.worldManager = new BukkitWorldManager();
|
this.worldManager = new BukkitWorldManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info("Using platform world manager: {}", this.worldManager.getName());
|
logger.info("[P2] Using platform world manager: {}", this.worldManager.getName());
|
||||||
|
|
||||||
// Clean up potential memory leak
|
// Clean up potential memory leak
|
||||||
Bukkit.getScheduler().runTaskTimer(this, () -> {
|
Bukkit.getScheduler().runTaskTimer(this, () -> {
|
||||||
@ -442,7 +442,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
final Chunk[] chunks = world.getLoadedChunks();
|
final Chunk[] chunks = world.getLoadedChunks();
|
||||||
if (chunks.length == 0) {
|
if (chunks.length == 0) {
|
||||||
if (!Bukkit.unloadWorld(world, true)) {
|
if (!Bukkit.unloadWorld(world, true)) {
|
||||||
logger.warn("Failed to unload {}", world.getName());
|
logger.warn("[P2] Failed to unload {}", world.getName());
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
@ -493,7 +493,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
logger.info("(UUID) {} UUIDs will be cached", uuidQueue.size());
|
logger.info("[P2] (UUID) {} UUIDs will be cached", uuidQueue.size());
|
||||||
|
|
||||||
Executors.newSingleThreadScheduledExecutor().schedule(() -> {
|
Executors.newSingleThreadScheduledExecutor().schedule(() -> {
|
||||||
// Begin by reading all the SQLite cache at once
|
// Begin by reading all the SQLite cache at once
|
||||||
@ -501,7 +501,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
// Now fetch names for all known UUIDs
|
// Now fetch names for all known UUIDs
|
||||||
final int totalSize = uuidQueue.size();
|
final int totalSize = uuidQueue.size();
|
||||||
int read = 0;
|
int read = 0;
|
||||||
logger.info("(UUID) PlotSquared will fetch UUIDs in groups of {}", Settings.UUID.BACKGROUND_LIMIT);
|
logger.info("[P2] (UUID) PlotSquared will fetch UUIDs in groups of {}", Settings.UUID.BACKGROUND_LIMIT);
|
||||||
final List<UUID> uuidList = new ArrayList<>(Settings.UUID.BACKGROUND_LIMIT);
|
final List<UUID> uuidList = new ArrayList<>(Settings.UUID.BACKGROUND_LIMIT);
|
||||||
|
|
||||||
// Used to indicate that the second retrieval has been attempted
|
// Used to indicate that the second retrieval has been attempted
|
||||||
@ -509,7 +509,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
|
|
||||||
while (!uuidQueue.isEmpty() || !uuidList.isEmpty()) {
|
while (!uuidQueue.isEmpty() || !uuidList.isEmpty()) {
|
||||||
if (!uuidList.isEmpty() && secondRun) {
|
if (!uuidList.isEmpty() && secondRun) {
|
||||||
logger.warn("(UUID) Giving up on last batch. Fetching new batch instead");
|
logger.warn("[P2] (UUID) Giving up on last batch. Fetching new batch instead");
|
||||||
uuidList.clear();
|
uuidList.clear();
|
||||||
}
|
}
|
||||||
if (uuidList.isEmpty()) {
|
if (uuidList.isEmpty()) {
|
||||||
@ -534,14 +534,13 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
// Print progress
|
// Print progress
|
||||||
final double percentage = ((double) read / (double) totalSize) * 100.0D;
|
final double percentage = ((double) read / (double) totalSize) * 100.0D;
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("(UUID) PlotSquared has cached {} of UUIDs", String.format("%.1f%%", percentage));
|
logger.info("[P2] (UUID) PlotSquared has cached {} of UUIDs", String.format("%.1f%%", percentage));
|
||||||
}
|
}
|
||||||
} catch (final InterruptedException | ExecutionException e) {
|
} catch (final InterruptedException | ExecutionException e) {
|
||||||
logger.error("(UUID) Failed to retrieve last batch. Will try again", e);
|
logger.error("[P2] (UUID) Failed to retrieve last batch. Will try again", e);
|
||||||
e.printStackTrace();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.info("(UUID) PlotSquared has cached all UUIDs");
|
logger.info("[P2] (UUID) PlotSquared has cached all UUIDs");
|
||||||
}, 10, TimeUnit.SECONDS);
|
}, 10, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -603,7 +602,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override @SuppressWarnings("deprecation") public void runEntityTask() {
|
@Override @SuppressWarnings("deprecation") public void runEntityTask() {
|
||||||
logger.info("KillAllEntities started");
|
logger.info("[P2] KillAllEntities started");
|
||||||
TaskManager.runTaskRepeat(() -> PlotSquared.get().forEachPlotArea(plotArea -> {
|
TaskManager.runTaskRepeat(() -> PlotSquared.get().forEachPlotArea(plotArea -> {
|
||||||
final World world = Bukkit.getWorld(plotArea.getWorldName());
|
final World world = Bukkit.getWorld(plotArea.getWorldName());
|
||||||
try {
|
try {
|
||||||
@ -1013,7 +1012,7 @@ public final class BukkitMain extends JavaPlugin implements Listener, IPlotMain<
|
|||||||
SetGenCB.setGenerator(BukkitUtil.getWorld(worldName));
|
SetGenCB.setGenerator(BukkitUtil.getWorld(worldName));
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to reload world: {} | {}", world, e.getMessage());
|
logger.error("[P2] Failed to reload world: {} | {}", world, e.getMessage());
|
||||||
Bukkit.getServer().unloadWorld(world, false);
|
Bukkit.getServer().unloadWorld(world, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -388,7 +388,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||||||
try {
|
try {
|
||||||
entity.getInventory().setContents(this.inventory);
|
entity.getInventory().setContents(this.inventory);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
logger.error("Failed to restore inventory", e);
|
logger.error("[P2] Failed to restore inventory", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -732,7 +732,7 @@ public final class ReplicatingEntityWrapper extends EntityWrapper {
|
|||||||
return entity;
|
return entity;
|
||||||
default:
|
default:
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Could not identify entity: {}", entity.getType());
|
logger.info("[P2] Could not identify entity: {}", entity.getType());
|
||||||
}
|
}
|
||||||
return entity;
|
return entity;
|
||||||
// END LIVING
|
// END LIVING
|
||||||
|
@ -508,7 +508,7 @@ public class BukkitUtil extends WorldUtil {
|
|||||||
@NonNull final BiomeType biomeType) {
|
@NonNull final BiomeType biomeType) {
|
||||||
final World world = getWorld(worldName);
|
final World world = getWorld(worldName);
|
||||||
if (world == null) {
|
if (world == null) {
|
||||||
logger.warn("An error occured while setting the biome because the world was null", new RuntimeException());
|
logger.warn("[P2] An error occured while setting the biome because the world was null", new RuntimeException());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final Biome biome = BukkitAdapter.adapt(biomeType);
|
final Biome biome = BukkitAdapter.adapt(biomeType);
|
||||||
@ -622,7 +622,7 @@ public class BukkitUtil extends WorldUtil {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
logger.error("Unknown entity category requested: {}", category);
|
logger.error("[P2] Unknown entity category requested: {}", category);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -126,7 +126,7 @@ public class ContentMap {
|
|||||||
try {
|
try {
|
||||||
entity.spawn(world, xOffset, zOffset);
|
entity.spawn(world, xOffset, zOffset);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Failed to restore entity", e);
|
logger.error("[P2] Failed to restore entity", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.entities.clear();
|
this.entities.clear();
|
||||||
|
@ -71,22 +71,22 @@ public class UpdateUtility implements Listener {
|
|||||||
.getAsJsonObject();
|
.getAsJsonObject();
|
||||||
spigotVersion = result.get("current_version").getAsString();
|
spigotVersion = result.get("current_version").getAsString();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Unable to check for updates. Error: {}", e.getMessage());
|
logger.error("[P2] Unable to check for updates. Error: {}", e.getMessage());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (internalVersion.isLaterVersion(spigotVersion)) {
|
if (internalVersion.isLaterVersion(spigotVersion)) {
|
||||||
logger.info("There appears to be a PlotSquared update available!");
|
logger.info("[P2] There appears to be a PlotSquared update available!");
|
||||||
logger.info("You are running version {}, the latest version is {}",
|
logger.info("[P2] You are running version {}, the latest version is {}",
|
||||||
internalVersion.versionString(), spigotVersion);
|
internalVersion.versionString(), spigotVersion);
|
||||||
logger.info("https://www.spigotmc.org/resources/77506/updates");
|
logger.info("[P2] https://www.spigotmc.org/resources/77506/updates");
|
||||||
hasUpdate = true;
|
hasUpdate = true;
|
||||||
if (Settings.UpdateChecker.NOTIFY_ONCE) {
|
if (Settings.UpdateChecker.NOTIFY_ONCE) {
|
||||||
cancelTask();
|
cancelTask();
|
||||||
}
|
}
|
||||||
} else if (notify) {
|
} else if (notify) {
|
||||||
notify = false;
|
notify = false;
|
||||||
logger.info("Congratulations! You are running the latest PlotSquared version");
|
logger.info("[P2] Congratulations! You are running the latest PlotSquared version");
|
||||||
}
|
}
|
||||||
}, 0L, Settings.UpdateChecker.POLL_RATE * 60 * 20);
|
}, 0L, Settings.UpdateChecker.POLL_RATE * 60 * 20);
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ public class PlotSquared {
|
|||||||
if (!getConfigurationVersion().equalsIgnoreCase("v5")) {
|
if (!getConfigurationVersion().equalsIgnoreCase("v5")) {
|
||||||
// Perform upgrade
|
// Perform upgrade
|
||||||
if (DBFunc.dbManager.convertFlags()) {
|
if (DBFunc.dbManager.convertFlags()) {
|
||||||
logger.info("Flags were converted successfully");
|
logger.info("[P2] Flags were converted successfully");
|
||||||
// Update the config version
|
// Update the config version
|
||||||
setConfigurationVersion("v5");
|
setConfigurationVersion("v5");
|
||||||
}
|
}
|
||||||
@ -285,7 +285,7 @@ public class PlotSquared {
|
|||||||
if (Settings.Enabled_Components.WORLDEDIT_RESTRICTIONS) {
|
if (Settings.Enabled_Components.WORLDEDIT_RESTRICTIONS) {
|
||||||
try {
|
try {
|
||||||
if (this.IMP.initWorldEdit()) {
|
if (this.IMP.initWorldEdit()) {
|
||||||
logger.info("{} hooked into WorldEdit", imp().getPluginName());
|
logger.info("[P2] {} hooked into WorldEdit", imp().getPluginName());
|
||||||
this.worldedit = WorldEdit.getInstance();
|
this.worldedit = WorldEdit.getInstance();
|
||||||
WorldEdit.getInstance().getEventBus().register(new WESubscriber());
|
WorldEdit.getInstance().getEventBus().register(new WESubscriber());
|
||||||
if (Settings.Enabled_Components.COMMANDS) {
|
if (Settings.Enabled_Components.COMMANDS) {
|
||||||
@ -294,7 +294,7 @@ public class PlotSquared {
|
|||||||
|
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("Incompatible version of WorldEdit, please upgrade: http://builds.enginehub.org/job/worldedit?branch=master");
|
logger.error("[P2] Incompatible version of WorldEdit, please upgrade: http://builds.enginehub.org/job/worldedit?branch=master");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -308,7 +308,7 @@ public class PlotSquared {
|
|||||||
try {
|
try {
|
||||||
new ComponentPresetManager();
|
new ComponentPresetManager();
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to initialize the preset system", e);
|
logger.error("[P2] Failed to initialize the preset system", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,11 +329,11 @@ public class PlotSquared {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!WorldUtil.IMP.isWorld(world) && !world.equals("*")) {
|
if (!WorldUtil.IMP.isWorld(world) && !world.equals("*")) {
|
||||||
logger.warn("`{}` was not properly loaded - {} will now try to load it properly",
|
logger.warn("[P2] `{}` was not properly loaded - {} will now try to load it properly",
|
||||||
world, imp().getPluginName());
|
world, imp().getPluginName());
|
||||||
logger.warn(" - Are you trying to delete this world? Remember to remove it from the worlds.yml, bukkit.yml and multiverse worlds.yml");
|
logger.warn("[P2] - Are you trying to delete this world? Remember to remove it from the worlds.yml, bukkit.yml and multiverse worlds.yml");
|
||||||
logger.warn(" - Your world management plugin may be faulty (or non existent)");
|
logger.warn("[P2] - Your world management plugin may be faulty (or non existent)");
|
||||||
logger.warn(" This message may also be a false positive and could be ignored.");
|
logger.warn("[P2] This message may also be a false positive and could be ignored.");
|
||||||
PlotSquared.this.IMP.setGenerator(world);
|
PlotSquared.this.IMP.setGenerator(world);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -509,16 +509,16 @@ public class PlotSquared {
|
|||||||
regionInts.forEach(l -> regions.add(BlockVector2.at(l[0], l[1])));
|
regionInts.forEach(l -> regions.add(BlockVector2.at(l[0], l[1])));
|
||||||
chunkInts.forEach(l -> chunks.add(BlockVector2.at(l[0], l[1])));
|
chunkInts.forEach(l -> chunks.add(BlockVector2.at(l[0], l[1])));
|
||||||
int height = (int) list.get(2);
|
int height = (int) list.get(2);
|
||||||
logger.info("Incomplete road regeneration found. Restarting in world {} with height {}", plotArea.getWorldName(), height);
|
logger.info("[P2] Incomplete road regeneration found. Restarting in world {} with height {}", plotArea.getWorldName(), height);
|
||||||
logger.info(" - Regions: {}", regions.size());
|
logger.info("[P2] - Regions: {}", regions.size());
|
||||||
logger.info(" - Chunks: {}", chunks.size());
|
logger.info("[P2] - Chunks: {}", chunks.size());
|
||||||
HybridUtils.UPDATE = true;
|
HybridUtils.UPDATE = true;
|
||||||
HybridUtils.manager.scheduleRoadUpdate(plotArea, regions, height, chunks);
|
HybridUtils.manager.scheduleRoadUpdate(plotArea, regions, height, chunks);
|
||||||
} catch (IOException | ClassNotFoundException e) {
|
} catch (IOException | ClassNotFoundException e) {
|
||||||
logger.error("Error restarting road regeneration", e);
|
logger.error("[P2] Error restarting road regeneration", e);
|
||||||
} finally {
|
} finally {
|
||||||
if (!file.delete()) {
|
if (!file.delete()) {
|
||||||
logger.error("Error deleting persistent_regen_data_{}. Please delete this file manually", plotArea.getId());
|
logger.error("[P2] Error deleting persistent_regen_data_{}. Please delete this file manually", plotArea.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1105,10 +1105,10 @@ public class PlotSquared {
|
|||||||
// Conventional plot generator
|
// Conventional plot generator
|
||||||
PlotArea plotArea = plotGenerator.getNewPlotArea(world, null, null, null);
|
PlotArea plotArea = plotGenerator.getNewPlotArea(world, null, null, null);
|
||||||
PlotManager plotManager = plotArea.getPlotManager();
|
PlotManager plotManager = plotArea.getPlotManager();
|
||||||
logger.info("Detected world load for '{}'", world);
|
logger.info("[P2] Detected world load for '{}'", world);
|
||||||
logger.info(" - generator: {}>{}", baseGenerator, plotGenerator);
|
logger.info("[P2] - generator: {}>{}", baseGenerator, plotGenerator);
|
||||||
logger.info(" - plot world: {}", plotArea.getClass().getCanonicalName());
|
logger.info("[P2] - plot world: {}", plotArea.getClass().getCanonicalName());
|
||||||
logger.info("- plot area manager: {}", plotManager.getClass().getCanonicalName());
|
logger.info("[P2] - plot area manager: {}", plotManager.getClass().getCanonicalName());
|
||||||
if (!this.worlds.contains(path)) {
|
if (!this.worlds.contains(path)) {
|
||||||
this.worlds.createSection(path);
|
this.worlds.createSection(path);
|
||||||
worldSection = this.worlds.getConfigurationSection(path);
|
worldSection = this.worlds.getConfigurationSection(path);
|
||||||
@ -1132,7 +1132,7 @@ public class PlotSquared {
|
|||||||
if (plotAreaManager.getPlotAreas(world, null).length != 0) {
|
if (plotAreaManager.getPlotAreas(world, null).length != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logger.info("Detected world load for '{}'", world);
|
logger.info("[P2] Detected world load for '{}'", world);
|
||||||
String gen_string = worldSection.getString("generator.plugin", IMP.getPluginName());
|
String gen_string = worldSection.getString("generator.plugin", IMP.getPluginName());
|
||||||
if (type == PlotAreaType.PARTIAL) {
|
if (type == PlotAreaType.PARTIAL) {
|
||||||
Set<PlotCluster> clusters =
|
Set<PlotCluster> clusters =
|
||||||
@ -1148,7 +1148,7 @@ public class PlotSquared {
|
|||||||
String fullId = name + "-" + pos1 + "-" + pos2;
|
String fullId = name + "-" + pos1 + "-" + pos2;
|
||||||
worldSection.createSection("areas." + fullId);
|
worldSection.createSection("areas." + fullId);
|
||||||
DBFunc.replaceWorld(world, world + ";" + name, pos1, pos2); // NPE
|
DBFunc.replaceWorld(world, world + ";" + name, pos1, pos2); // NPE
|
||||||
logger.info(" - {}-{}-{}", name, pos1, pos2);
|
logger.info("[P2] - {}-{}-{}", name, pos1, pos2);
|
||||||
GeneratorWrapper<?> areaGen = this.IMP.getGenerator(world, gen_string);
|
GeneratorWrapper<?> areaGen = this.IMP.getGenerator(world, gen_string);
|
||||||
if (areaGen == null) {
|
if (areaGen == null) {
|
||||||
throw new IllegalArgumentException("Invalid Generator: " + gen_string);
|
throw new IllegalArgumentException("Invalid Generator: " + gen_string);
|
||||||
@ -1162,10 +1162,10 @@ public class PlotSquared {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
logger.info(" | generator: {}>{}", baseGenerator, areaGen);
|
logger.info("[P2] | generator: {}>{}", baseGenerator, areaGen);
|
||||||
logger.info(" | plot world: {}", pa);
|
logger.info("[P2] | plot world: {}", pa);
|
||||||
logger.info(" | manager: {}", pa);
|
logger.info("[P2] | manager: {}", pa);
|
||||||
logger.info("Note: Area created for cluster '{}' (invalid or old configuration?)", name);
|
logger.info("[P2] Note: Area created for cluster '{}' (invalid or old configuration?)", name);
|
||||||
areaGen.getPlotGenerator().initialize(pa);
|
areaGen.getPlotGenerator().initialize(pa);
|
||||||
areaGen.augment(pa);
|
areaGen.augment(pa);
|
||||||
toLoad.add(pa);
|
toLoad.add(pa);
|
||||||
@ -1187,9 +1187,9 @@ public class PlotSquared {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
logger.info(" - generator: {}>{}", baseGenerator, areaGen);
|
logger.info("[P2] - generator: {}>{}", baseGenerator, areaGen);
|
||||||
logger.info(" - plot world: {}", pa);
|
logger.info("[P2] - plot world: {}", pa);
|
||||||
logger.info(" - plot area manager: {}", pa.getPlotManager());
|
logger.info("[P2] - plot area manager: {}", pa.getPlotManager());
|
||||||
areaGen.getPlotGenerator().initialize(pa);
|
areaGen.getPlotGenerator().initialize(pa);
|
||||||
areaGen.augment(pa);
|
areaGen.augment(pa);
|
||||||
addPlotArea(pa);
|
addPlotArea(pa);
|
||||||
@ -1201,7 +1201,7 @@ public class PlotSquared {
|
|||||||
+ PlotAreaType.AUGMENTED + "`");
|
+ PlotAreaType.AUGMENTED + "`");
|
||||||
}
|
}
|
||||||
for (String areaId : areasSection.getKeys(false)) {
|
for (String areaId : areasSection.getKeys(false)) {
|
||||||
logger.info(" - {}", areaId);
|
logger.info("[P2] - {}", areaId);
|
||||||
String[] split = areaId.split("(?<=[^;-])-");
|
String[] split = areaId.split("(?<=[^;-])-");
|
||||||
if (split.length != 3) {
|
if (split.length != 3) {
|
||||||
throw new IllegalArgumentException("Invalid Area identifier: " + areaId
|
throw new IllegalArgumentException("Invalid Area identifier: " + areaId
|
||||||
@ -1263,10 +1263,10 @@ public class PlotSquared {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
logger.info("Detected area load for '{}'", world);
|
logger.info("[P2] Detected area load for '{}'", world);
|
||||||
logger.info(" | generator: {}>{}", baseGenerator, areaGen);
|
logger.info("[P2] | generator: {}>{}", baseGenerator, areaGen);
|
||||||
logger.info(" | plot world: {}", pa);
|
logger.info("[P2] | plot world: {}", pa);
|
||||||
logger.info(" | manager: {}", pa.getPlotManager());
|
logger.info("[P2] | manager: {}", pa.getPlotManager());
|
||||||
areaGen.getPlotGenerator().initialize(pa);
|
areaGen.getPlotGenerator().initialize(pa);
|
||||||
areaGen.augment(pa);
|
areaGen.augment(pa);
|
||||||
addPlotArea(pa);
|
addPlotArea(pa);
|
||||||
@ -1335,7 +1335,7 @@ public class PlotSquared {
|
|||||||
for (String element : split) {
|
for (String element : split) {
|
||||||
String[] pair = element.split("=");
|
String[] pair = element.split("=");
|
||||||
if (pair.length != 2) {
|
if (pair.length != 2) {
|
||||||
logger.error("No value provided for '{}'", element);
|
logger.error("[P2] No value provided for '{}'", element);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String key = pair[0].toLowerCase();
|
String key = pair[0].toLowerCase();
|
||||||
@ -1383,11 +1383,11 @@ public class PlotSquared {
|
|||||||
ConfigurationUtil.BLOCK_BUCKET.parseString(value).toString());
|
ConfigurationUtil.BLOCK_BUCKET.parseString(value).toString());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
logger.error("Key not found: {}", element);
|
logger.error("[P2] Key not found: {}", element);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Invalid value '{}' for arg '{}'", value, element);
|
logger.error("[P2] Invalid value '{}' for arg '{}'", value, element);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1466,7 +1466,7 @@ public class PlotSquared {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Could not save {}", file);
|
logger.error("[P2] Could not save {}", file);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1502,7 +1502,7 @@ public class PlotSquared {
|
|||||||
// Close the connection
|
// Close the connection
|
||||||
DBFunc.close();
|
DBFunc.close();
|
||||||
} catch (NullPointerException throwable) {
|
} catch (NullPointerException throwable) {
|
||||||
logger.error("Could not close database connection", throwable);
|
logger.error("[P2] Could not close database connection", throwable);
|
||||||
throwable.printStackTrace();
|
throwable.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1515,9 +1515,9 @@ public class PlotSquared {
|
|||||||
HybridUtils.regions.isEmpty() && HybridUtils.chunks.isEmpty())) {
|
HybridUtils.regions.isEmpty() && HybridUtils.chunks.isEmpty())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
logger.info("Road regeneration incomplete. Saving incomplete regions to disk");
|
logger.info("[P2] Road regeneration incomplete. Saving incomplete regions to disk");
|
||||||
logger.info(" - regions: {}", HybridUtils.regions.size());
|
logger.info("[P2] - regions: {}", HybridUtils.regions.size());
|
||||||
logger.info(" - chunks: {}", HybridUtils.chunks.size());
|
logger.info("[P2] - chunks: {}", HybridUtils.chunks.size());
|
||||||
ArrayList<int[]> regions = new ArrayList<>();
|
ArrayList<int[]> regions = new ArrayList<>();
|
||||||
ArrayList<int[]> chunks = new ArrayList<>();
|
ArrayList<int[]> chunks = new ArrayList<>();
|
||||||
for (BlockVector2 r : HybridUtils.regions) {
|
for (BlockVector2 r : HybridUtils.regions) {
|
||||||
@ -1534,14 +1534,14 @@ public class PlotSquared {
|
|||||||
this.IMP.getDirectory() + File.separator + "persistent_regen_data_" + HybridUtils.area
|
this.IMP.getDirectory() + File.separator + "persistent_regen_data_" + HybridUtils.area
|
||||||
.getId() + "_" + HybridUtils.area.getWorldName());
|
.getId() + "_" + HybridUtils.area.getWorldName());
|
||||||
if (file.exists() && !file.delete()) {
|
if (file.exists() && !file.delete()) {
|
||||||
logger.error("persistent_regene_data file already exists and could not be deleted");
|
logger.error("[P2] persistent_regene_data file already exists and could not be deleted");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try (ObjectOutputStream oos = new ObjectOutputStream(
|
try (ObjectOutputStream oos = new ObjectOutputStream(
|
||||||
Files.newOutputStream(file.toPath(), StandardOpenOption.CREATE_NEW))) {
|
Files.newOutputStream(file.toPath(), StandardOpenOption.CREATE_NEW))) {
|
||||||
oos.writeObject(list);
|
oos.writeObject(list);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Error creating persistent_region_data file", e);
|
logger.error("[P2] Error creating persistent_region_data file", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1561,7 +1561,7 @@ public class PlotSquared {
|
|||||||
File file = MainUtil.getFile(IMP.getDirectory(), Storage.SQLite.DB + ".db");
|
File file = MainUtil.getFile(IMP.getDirectory(), Storage.SQLite.DB + ".db");
|
||||||
database = new SQLite(file);
|
database = new SQLite(file);
|
||||||
} else {
|
} else {
|
||||||
logger.error("No storage type is set. Disabling PlotSquared");
|
logger.error("[P2] No storage type is set. Disabling PlotSquared");
|
||||||
this.IMP.shutdown(); //shutdown used instead of disable because no database is set
|
this.IMP.shutdown(); //shutdown used instead of disable because no database is set
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1579,11 +1579,11 @@ public class PlotSquared {
|
|||||||
}
|
}
|
||||||
this.clusters_tmp = DBFunc.getClusters();
|
this.clusters_tmp = DBFunc.getClusters();
|
||||||
} catch (ClassNotFoundException | SQLException e) {
|
} catch (ClassNotFoundException | SQLException e) {
|
||||||
logger.error("Failed to open database connection ({}). Disabling PlotSquared", Storage.MySQL.USE ? "MySQL" : "SQLite");
|
logger.error("[P2] Failed to open database connection ({}). Disabling PlotSquared", Storage.MySQL.USE ? "MySQL" : "SQLite");
|
||||||
logger.error("==== Here is an ugly stacktrace, if you are interested in those things ===");
|
logger.error("[P2] ==== Here is an ugly stacktrace, if you are interested in those things ===");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("&d==== End of stacktrace ====");
|
logger.error("[P2] &d==== End of stacktrace ====");
|
||||||
logger.error("&6Please go to the {} 'storage.yml' and configure the database correctly",
|
logger.error("[P2] &6Please go to the {} 'storage.yml' and configure the database correctly",
|
||||||
imp().getPluginName());
|
imp().getPluginName());
|
||||||
this.IMP.shutdown(); //shutdown used instead of disable because of database error
|
this.IMP.shutdown(); //shutdown used instead of disable because of database error
|
||||||
}
|
}
|
||||||
@ -1609,7 +1609,7 @@ public class PlotSquared {
|
|||||||
try {
|
try {
|
||||||
worlds.save(worldsFile);
|
worlds.save(worldsFile);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Failed to save worlds.yml", e);
|
logger.error("[P2] Failed to save worlds.yml", e);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1642,12 +1642,12 @@ public class PlotSquared {
|
|||||||
public boolean setupConfigs() {
|
public boolean setupConfigs() {
|
||||||
File folder = new File(this.IMP.getDirectory(), "config");
|
File folder = new File(this.IMP.getDirectory(), "config");
|
||||||
if (!folder.exists() && !folder.mkdirs()) {
|
if (!folder.exists() && !folder.mkdirs()) {
|
||||||
logger.error("Failed to create the /plugins/config folder. Please create it manually");
|
logger.error("[P2] Failed to create the /plugins/config folder. Please create it manually");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.worldsFile = new File(folder, "worlds.yml");
|
this.worldsFile = new File(folder, "worlds.yml");
|
||||||
if (!this.worldsFile.exists() && !this.worldsFile.createNewFile()) {
|
if (!this.worldsFile.exists() && !this.worldsFile.createNewFile()) {
|
||||||
logger.error("Could not create the worlds file. Please create 'worlds.yml' manually");
|
logger.error("[P2] Could not create the worlds file. Please create 'worlds.yml' manually");
|
||||||
}
|
}
|
||||||
this.worlds = YamlConfiguration.loadConfiguration(this.worldsFile);
|
this.worlds = YamlConfiguration.loadConfiguration(this.worldsFile);
|
||||||
|
|
||||||
@ -1680,17 +1680,17 @@ public class PlotSquared {
|
|||||||
this.worlds.set("configuration_version", LegacyConverter.CONFIGURATION_VERSION);
|
this.worlds.set("configuration_version", LegacyConverter.CONFIGURATION_VERSION);
|
||||||
}
|
}
|
||||||
} catch (IOException ignored) {
|
} catch (IOException ignored) {
|
||||||
logger.error("Failed to save worlds.yml");
|
logger.error("[P2] Failed to save worlds.yml");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.configFile = new File(folder, "settings.yml");
|
this.configFile = new File(folder, "settings.yml");
|
||||||
if (!this.configFile.exists() && !this.configFile.createNewFile()) {
|
if (!this.configFile.exists() && !this.configFile.createNewFile()) {
|
||||||
logger.error("Could not create the settings file. Please create 'settings.yml' manually");
|
logger.error("[P2] Could not create the settings file. Please create 'settings.yml' manually");
|
||||||
}
|
}
|
||||||
this.config = YamlConfiguration.loadConfiguration(this.configFile);
|
this.config = YamlConfiguration.loadConfiguration(this.configFile);
|
||||||
setupConfig();
|
setupConfig();
|
||||||
} catch (IOException ignored) {
|
} catch (IOException ignored) {
|
||||||
logger.error("Failed to save settings.yml");
|
logger.error("[P2] Failed to save settings.yml");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.styleFile = MainUtil.getFile(IMP.getDirectory(),
|
this.styleFile = MainUtil.getFile(IMP.getDirectory(),
|
||||||
@ -1700,38 +1700,38 @@ public class PlotSquared {
|
|||||||
this.styleFile.getParentFile().mkdirs();
|
this.styleFile.getParentFile().mkdirs();
|
||||||
}
|
}
|
||||||
if (!this.styleFile.createNewFile()) {
|
if (!this.styleFile.createNewFile()) {
|
||||||
logger.error("Failed to create the style file. Please create 'translations/style.yml' manually");
|
logger.error("[P2] Failed to create the style file. Please create 'translations/style.yml' manually");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.style = YamlConfiguration.loadConfiguration(this.styleFile);
|
this.style = YamlConfiguration.loadConfiguration(this.styleFile);
|
||||||
setupStyle();
|
setupStyle();
|
||||||
} catch (IOException ignored) {
|
} catch (IOException ignored) {
|
||||||
logger.error("Failed to save style.yml");
|
logger.error("[P2] Failed to save style.yml");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.storageFile = new File(folder, "storage.yml");
|
this.storageFile = new File(folder, "storage.yml");
|
||||||
if (!this.storageFile.exists() && !this.storageFile.createNewFile()) {
|
if (!this.storageFile.exists() && !this.storageFile.createNewFile()) {
|
||||||
logger.error("Could not create the storage settings file. Please create 'storage.yml' manually");
|
logger.error("[P2] Could not create the storage settings file. Please create 'storage.yml' manually");
|
||||||
}
|
}
|
||||||
this.storage = YamlConfiguration.loadConfiguration(this.storageFile);
|
this.storage = YamlConfiguration.loadConfiguration(this.storageFile);
|
||||||
setupStorage();
|
setupStorage();
|
||||||
} catch (IOException ignored) {
|
} catch (IOException ignored) {
|
||||||
logger.error("Failed to save storage.yml");
|
logger.error("[P2] Failed to save storage.yml");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.commandsFile = new File(folder, "commands.yml");
|
this.commandsFile = new File(folder, "commands.yml");
|
||||||
if (!this.commandsFile.exists() && !this.commandsFile.createNewFile()) {
|
if (!this.commandsFile.exists() && !this.commandsFile.createNewFile()) {
|
||||||
logger.error("Could not create the commands file. Please create 'commands.yml' manually");
|
logger.error("[P2] Could not create the commands file. Please create 'commands.yml' manually");
|
||||||
}
|
}
|
||||||
this.commands = YamlConfiguration.loadConfiguration(this.commandsFile);
|
this.commands = YamlConfiguration.loadConfiguration(this.commandsFile);
|
||||||
} catch (IOException ignored) {
|
} catch (IOException ignored) {
|
||||||
logger.error("Failed to save commands.yml");
|
logger.error("[P2] Failed to save commands.yml");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
this.style.save(this.styleFile);
|
this.style.save(this.styleFile);
|
||||||
this.commands.save(this.commandsFile);
|
this.commands.save(this.commandsFile);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Configuration file saving failed", e);
|
logger.error("[P2] Configuration file saving failed", e);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1762,7 +1762,7 @@ public class PlotSquared {
|
|||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
Map<String, Object> components = Settings.getFields(Settings.Enabled_Components.class);
|
Map<String, Object> components = Settings.getFields(Settings.Enabled_Components.class);
|
||||||
for (Entry<String, Object> component : components.entrySet()) {
|
for (Entry<String, Object> component : components.entrySet()) {
|
||||||
logger.info("Key: {} | Value: {}", component.getKey(), component.getValue());
|
logger.info("[P2] Key: {} | Value: {}", component.getKey(), component.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,10 +84,10 @@ public class Debug extends SubCommand {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (args.length > 0 && "logging".equalsIgnoreCase(args[0])) {
|
if (args.length > 0 && "logging".equalsIgnoreCase(args[0])) {
|
||||||
logger.info("Info!");
|
logger.info("[P2] Info!");
|
||||||
logger.warn("Warning!");
|
logger.warn("[P2] Warning!");
|
||||||
logger.error("Error!", new RuntimeException());
|
logger.error("[P2] Error!", new RuntimeException());
|
||||||
logger.debug("Debug!");
|
logger.debug("[P2] Debug!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (args.length > 0 && "entitytypes".equalsIgnoreCase(args[0])) {
|
if (args.length > 0 && "entitytypes".equalsIgnoreCase(args[0])) {
|
||||||
|
@ -463,12 +463,12 @@ public class DebugExec extends SubCommand {
|
|||||||
} catch (ScriptException e) {
|
} catch (ScriptException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
logger.info("> {}ms -> {}", System.currentTimeMillis() - start, result);
|
logger.info("[P2] > {}ms -> {}", System.currentTimeMillis() - start, result);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
long start = System.currentTimeMillis();
|
long start = System.currentTimeMillis();
|
||||||
Object result = this.engine.eval(script, this.scope);
|
Object result = this.engine.eval(script, this.scope);
|
||||||
logger.info("> {}ms -> {}", System.currentTimeMillis() - start, result);
|
logger.info("[P2] > {}ms -> {}", System.currentTimeMillis() - start, result);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} catch (ScriptException e) {
|
} catch (ScriptException e) {
|
||||||
|
@ -175,7 +175,7 @@ public class Purge extends SubCommand {
|
|||||||
boolean finalClear = clear;
|
boolean finalClear = clear;
|
||||||
Runnable run = () -> {
|
Runnable run = () -> {
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Calculating plots to purge, please wait...");
|
logger.info("[P2] Calculating plots to purge, please wait...");
|
||||||
}
|
}
|
||||||
HashSet<Integer> ids = new HashSet<>();
|
HashSet<Integer> ids = new HashSet<>();
|
||||||
Iterator<Plot> iterator = toDelete.iterator();
|
Iterator<Plot> iterator = toDelete.iterator();
|
||||||
@ -191,7 +191,7 @@ public class Purge extends SubCommand {
|
|||||||
if (finalClear) {
|
if (finalClear) {
|
||||||
plot.clear(false, true, () -> {
|
plot.clear(false, true, () -> {
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Plot {} cleared by purge", plot.getId());
|
logger.info("[P2] Plot {} cleared by purge", plot.getId());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -202,7 +202,7 @@ public class Purge extends SubCommand {
|
|||||||
PlotListener.plotEntry(pp, plot);
|
PlotListener.plotEntry(pp, plot);
|
||||||
}
|
}
|
||||||
} catch (NullPointerException e) {
|
} catch (NullPointerException e) {
|
||||||
logger.error("NullPointer during purge detected. This is likely"
|
logger.error("[P2] NullPointer during purge detected. This is likely"
|
||||||
+ " because you are deleting a world that has been removed", e);
|
+ " because you are deleting a world that has been removed", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,15 +181,15 @@ public class Trim extends SubCommand {
|
|||||||
@Override public void run(Set<BlockVector2> viable, final Set<BlockVector2> nonViable) {
|
@Override public void run(Set<BlockVector2> viable, final Set<BlockVector2> nonViable) {
|
||||||
Runnable regenTask;
|
Runnable regenTask;
|
||||||
if (regen) {
|
if (regen) {
|
||||||
logger.info("Starting regen task");
|
logger.info("[P2] Starting regen task");
|
||||||
logger.info(" - This is a VERY slow command");
|
logger.info("[P2] - This is a VERY slow command");
|
||||||
logger.info(" - It will say 'Trim done!' when complete");
|
logger.info("[P2] - It will say 'Trim done!' when complete");
|
||||||
regenTask = new Runnable() {
|
regenTask = new Runnable() {
|
||||||
@Override public void run() {
|
@Override public void run() {
|
||||||
if (nonViable.isEmpty()) {
|
if (nonViable.isEmpty()) {
|
||||||
Trim.TASK = false;
|
Trim.TASK = false;
|
||||||
player.sendMessage("Trim done!");
|
player.sendMessage("Trim done!");
|
||||||
logger.info("Trim done!");
|
logger.info("[P2] Trim done!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Iterator<BlockVector2> iterator = nonViable.iterator();
|
Iterator<BlockVector2> iterator = nonViable.iterator();
|
||||||
|
@ -74,7 +74,7 @@ public class ComponentPresetManager {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (!created) {
|
if (!created) {
|
||||||
logger.error("Failed to create components.yml");
|
logger.error("[P2] Failed to create components.yml");
|
||||||
this.guiName = "&cInvalid!";
|
this.guiName = "&cInvalid!";
|
||||||
this.presets = new ArrayList<>();
|
this.presets = new ArrayList<>();
|
||||||
return;
|
return;
|
||||||
@ -90,7 +90,7 @@ public class ComponentPresetManager {
|
|||||||
try {
|
try {
|
||||||
yamlConfiguration.save(file);
|
yamlConfiguration.save(file);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Failed to save default values to components.yml", e);
|
logger.error("[P2] Failed to save default values to components.yml", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.guiName = yamlConfiguration.getString("title", "&6Plot Components");
|
this.guiName = yamlConfiguration.getString("title", "&6Plot Components");
|
||||||
@ -108,7 +108,7 @@ public class ComponentPresetManager {
|
|||||||
try {
|
try {
|
||||||
yamlConfiguration.save(file);
|
yamlConfiguration.save(file);
|
||||||
} catch (final IOException e) {
|
} catch (final IOException e) {
|
||||||
logger.error("Failed to save default values to components.yml", e);
|
logger.error("[P2] Failed to save default values to components.yml", e);
|
||||||
}
|
}
|
||||||
this.presets = defaultPreset;
|
this.presets = defaultPreset;
|
||||||
}
|
}
|
||||||
|
@ -98,12 +98,12 @@ public class Config {
|
|||||||
field.set(instance, value);
|
field.set(instance, value);
|
||||||
return;
|
return;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
logger.error("Invalid configuration value '{}: {}' in {}", key, value, root.getSimpleName());
|
logger.error("[P2] Invalid configuration value '{}: {}' in {}", key, value, root.getSimpleName());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
logger.error("Failed to set config option '{}: {}' | {}", key, value, instance);
|
logger.error("[P2] Failed to set config option '{}: {}' | {}", key, value, instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean load(File file, Class<? extends Config> root) {
|
public static boolean load(File file, Class<? extends Config> root) {
|
||||||
@ -289,7 +289,7 @@ public class Config {
|
|||||||
setAccessible(field);
|
setAccessible(field);
|
||||||
return field;
|
return field;
|
||||||
} catch (final Throwable e) {
|
} catch (final Throwable e) {
|
||||||
logger.error("Invalid config field: {} for {}",
|
logger.error("[P2] Invalid config field: {} for {}",
|
||||||
StringMan.join(split, "."), toNodeName(instance.getClass().getSimpleName()));
|
StringMan.join(split, "."), toNodeName(instance.getClass().getSimpleName()));
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return null;
|
return null;
|
||||||
|
@ -82,11 +82,11 @@ public class YamlConfiguration extends FileConfiguration {
|
|||||||
}
|
}
|
||||||
Files.copy(file.toPath(), dest.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
Files.copy(file.toPath(), dest.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.error("Could not read: {}", file);
|
logger.error("[P2] Could not read: {}", file);
|
||||||
logger.error("Renamed to: {}", file);
|
logger.error("[P2] Renamed to: {}", file);
|
||||||
logger.error("============ Full stacktrace ============");
|
logger.error("[P2] ============ Full stacktrace ============");
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
logger.error("=========================================");
|
logger.error("[P2] =========================================");
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -358,12 +358,12 @@ public class SQLManager implements AbstractDB {
|
|||||||
try {
|
try {
|
||||||
task.run();
|
task.run();
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("============ DATABASE ERROR ============");
|
logger.error("[P2] ============ DATABASE ERROR ============");
|
||||||
logger.error("============ DATABASE ERROR ============");
|
logger.error("[P2] ============ DATABASE ERROR ============");
|
||||||
logger.error("There was an error updating the database.");
|
logger.error("[P2] There was an error updating the database.");
|
||||||
logger.error(" - It will be corrected on shutdown");
|
logger.error("[P2] - It will be corrected on shutdown");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("========================================");
|
logger.error("[P2] ========================================");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
commit();
|
commit();
|
||||||
@ -413,12 +413,12 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
lastTask = task;
|
lastTask = task;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("============ DATABASE ERROR ============");
|
logger.error("[P2] ============ DATABASE ERROR ============");
|
||||||
logger.error("There was an error updating the database.");
|
logger.error("[P2] There was an error updating the database.");
|
||||||
logger.error(" - It will be corrected on shutdown");
|
logger.error("[P2] - It will be corrected on shutdown");
|
||||||
logger.error("========================================");
|
logger.error("[P2] ========================================");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("========================================");
|
logger.error("[P2] ========================================");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (statement != null && task != null) {
|
if (statement != null && task != null) {
|
||||||
@ -458,12 +458,12 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
lastTask = task;
|
lastTask = task;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("============ DATABASE ERROR ============");
|
logger.error("[P2] ============ DATABASE ERROR ============");
|
||||||
logger.error("There was an error updating the database.");
|
logger.error("[P2] There was an error updating the database.");
|
||||||
logger.error(" - It will be corrected on shutdown");
|
logger.error("[P2] - It will be corrected on shutdown");
|
||||||
logger.error("========================================");
|
logger.error("[P2] ========================================");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("========================================");
|
logger.error("[P2] ========================================");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (statement != null && task != null) {
|
if (statement != null && task != null) {
|
||||||
@ -504,12 +504,12 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
lastTask = task;
|
lastTask = task;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("============ DATABASE ERROR ============");
|
logger.error("[P2] ============ DATABASE ERROR ============");
|
||||||
logger.error("There was an error updating the database.");
|
logger.error("[P2] There was an error updating the database.");
|
||||||
logger.error(" - It will be corrected on shutdown");
|
logger.error("[P2] - It will be corrected on shutdown");
|
||||||
logger.error("========================================");
|
logger.error("[P2] ========================================");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("========================================");
|
logger.error("[P2] ========================================");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (statement != null && task != null) {
|
if (statement != null && task != null) {
|
||||||
@ -533,12 +533,12 @@ public class SQLManager implements AbstractDB {
|
|||||||
this.plotTasks.clear();
|
this.plotTasks.clear();
|
||||||
}
|
}
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("============ DATABASE ERROR ============");
|
logger.error("[P2] ============ DATABASE ERROR ============");
|
||||||
logger.error("There was an error updating the database.");
|
logger.error("[P2] There was an error updating the database.");
|
||||||
logger.error(" - It will be corrected on shutdown");
|
logger.error("[P2] - It will be corrected on shutdown");
|
||||||
logger.error("========================================");
|
logger.error("[P2] ========================================");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("========================================");
|
logger.error("[P2] ========================================");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -626,7 +626,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
})))));
|
})))));
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
logger.warn("Failed to set all flags and member tiers for plots", e);
|
logger.warn("[P2] Failed to set all flags and member tiers for plots", e);
|
||||||
try {
|
try {
|
||||||
SQLManager.this.connection.commit();
|
SQLManager.this.connection.commit();
|
||||||
} catch (SQLException e1) {
|
} catch (SQLException e1) {
|
||||||
@ -635,7 +635,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.warn("Warning! Failed to set all helper for plots", e);
|
logger.warn("[P2] Warning! Failed to set all helper for plots", e);
|
||||||
try {
|
try {
|
||||||
SQLManager.this.connection.commit();
|
SQLManager.this.connection.commit();
|
||||||
} catch (SQLException e1) {
|
} catch (SQLException e1) {
|
||||||
@ -704,19 +704,19 @@ public class SQLManager implements AbstractDB {
|
|||||||
try {
|
try {
|
||||||
preparedStatement.executeBatch();
|
preparedStatement.executeBatch();
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to store flag values for plot with entry ID: {}", plot);
|
logger.error("[P2] Failed to store flag values for plot with entry ID: {}", plot);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("- Finished converting flag values for plot with entry ID: {}",
|
logger.info("[P2] - Finished converting flag values for plot with entry ID: {}",
|
||||||
plot.getId());
|
plot.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to store flag values", e);
|
logger.error("[P2] Failed to store flag values", e);
|
||||||
}
|
}
|
||||||
logger.info("Finished converting flags ({} plots processed)", plots.size());
|
logger.info("[P2] Finished converting flags ({} plots processed)", plots.size());
|
||||||
whenDone.run();
|
whenDone.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -833,7 +833,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
return;
|
return;
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
if (this.mySQL) {
|
if (this.mySQL) {
|
||||||
logger.error("1: | {}", objList.get(0).getClass().getCanonicalName());
|
logger.error("[P2] 1: | {}", objList.get(0).getClass().getCanonicalName());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -871,8 +871,8 @@ public class SQLManager implements AbstractDB {
|
|||||||
preparedStmt.close();
|
preparedStmt.close();
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("2: | {}", objList.get(0).getClass().getCanonicalName());
|
logger.error("[P2] 2: | {}", objList.get(0).getClass().getCanonicalName());
|
||||||
logger.error("Could not bulk save!");
|
logger.error("[P2] Could not bulk save!");
|
||||||
try (PreparedStatement preparedStmt = this.connection
|
try (PreparedStatement preparedStmt = this.connection
|
||||||
.prepareStatement(mod.getCreateSQL())) {
|
.prepareStatement(mod.getCreateSQL())) {
|
||||||
for (T obj : objList) {
|
for (T obj : objList) {
|
||||||
@ -881,7 +881,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
preparedStmt.executeBatch();
|
preparedStmt.executeBatch();
|
||||||
} catch (SQLException e3) {
|
} catch (SQLException e3) {
|
||||||
logger.error("Failed to save all", e);
|
logger.error("[P2] Failed to save all", e);
|
||||||
e3.printStackTrace();
|
e3.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -933,7 +933,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
try {
|
try {
|
||||||
preparedStatement.executeBatch();
|
preparedStatement.executeBatch();
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to store settings for plot with entry ID: {}", legacySettings.id);
|
logger.error("[P2] Failed to store settings for plot with entry ID: {}", legacySettings.id);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -945,13 +945,13 @@ public class SQLManager implements AbstractDB {
|
|||||||
try {
|
try {
|
||||||
preparedStatement.executeBatch();
|
preparedStatement.executeBatch();
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to store settings", e);
|
logger.error("[P2] Failed to store settings", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to store settings", e);
|
logger.error("[P2] Failed to store settings", e);
|
||||||
}
|
}
|
||||||
logger.info("Finished converting settihgs ({} plots processed)", myList.size());
|
logger.info("[P2] Finished converting settihgs ({} plots processed)", myList.size());
|
||||||
whenDone.run();
|
whenDone.run();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1632,11 +1632,11 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to load old flag values", e);
|
logger.error("[P2] Failed to load old flag values", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
logger.info("Loaded {} plot flag collections...", flagMap.size());
|
logger.info("[P2] Loaded {} plot flag collections...", flagMap.size());
|
||||||
logger.info("Attempting to store these flags in the new table...");
|
logger.info("[P2] Attempting to store these flags in the new table...");
|
||||||
try (final PreparedStatement preparedStatement = this.connection.prepareStatement(
|
try (final PreparedStatement preparedStatement = this.connection.prepareStatement(
|
||||||
"INSERT INTO `" + SQLManager.this.prefix
|
"INSERT INTO `" + SQLManager.this.prefix
|
||||||
+ "plot_flags`(`plot_id`, `flag`, `value`) VALUES(?, ?, ?)")) {
|
+ "plot_flags`(`plot_id`, `flag`, `value`) VALUES(?, ?, ?)")) {
|
||||||
@ -1664,7 +1664,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
try {
|
try {
|
||||||
preparedStatement.executeBatch();
|
preparedStatement.executeBatch();
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to store flag values for plot with entry ID: {}", plotFlagEntry.getKey());
|
logger.error("[P2] Failed to store flag values for plot with entry ID: {}", plotFlagEntry.getKey());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1672,17 +1672,17 @@ public class SQLManager implements AbstractDB {
|
|||||||
if (System.currentTimeMillis() - timeStarted >= 1000L || plotsProcessed >= flagMap
|
if (System.currentTimeMillis() - timeStarted >= 1000L || plotsProcessed >= flagMap
|
||||||
.size()) {
|
.size()) {
|
||||||
timeStarted = System.currentTimeMillis();
|
timeStarted = System.currentTimeMillis();
|
||||||
logger.info("... Flag conversion in progress. {}% done",
|
logger.info("[P2] ... Flag conversion in progress. {}% done",
|
||||||
String.format("%.1f", ((float) flagsProcessed / totalFlags) * 100));
|
String.format("%.1f", ((float) flagsProcessed / totalFlags) * 100));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("- Finished converting flags for plot with entry ID: {}",
|
logger.info("[P2] - Finished converting flags for plot with entry ID: {}",
|
||||||
plotFlagEntry.getKey());
|
plotFlagEntry.getKey());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to store flag values", e);
|
logger.error("[P2] Failed to store flag values", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -1774,7 +1774,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(parsable)
|
time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(parsable)
|
||||||
.getTime();
|
.getTime();
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
logger.error("Could not parse date for plot: #{}({};{}) ({})",
|
logger.error("[P2] Could not parse date for plot: #{}({};{}) ({})",
|
||||||
id, areaID, plot_id, parsable);
|
id, areaID, plot_id, parsable);
|
||||||
time = System.currentTimeMillis() + id;
|
time = System.currentTimeMillis() + id;
|
||||||
}
|
}
|
||||||
@ -1789,7 +1789,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
if (Settings.Enabled_Components.DATABASE_PURGER) {
|
if (Settings.Enabled_Components.DATABASE_PURGER) {
|
||||||
toDelete.add(last.temp);
|
toDelete.add(last.temp);
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.info("Plot #{}({}) in `{}plot` is a duplicate."
|
logger.info("[P2] Plot #{}({}) in `{}plot` is a duplicate."
|
||||||
+ " Delete this plot or set `database-purger: true` in the settings.yml", id, last, this.prefix);
|
+ " Delete this plot or set `database-purger: true` in the settings.yml", id, last, this.prefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1821,7 +1821,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
||||||
toDelete.add(id);
|
toDelete.add(id);
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.info("Entry #{}({}) in `plot_rating` does not exist."
|
logger.info("[P2] Entry #{}({}) in `plot_rating` does not exist."
|
||||||
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1849,7 +1849,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
||||||
toDelete.add(id);
|
toDelete.add(id);
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.info("Entry #{}({}) in `plot_helpers` does not exist."
|
logger.info("[P2] Entry #{}({}) in `plot_helpers` does not exist."
|
||||||
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1876,7 +1876,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
||||||
toDelete.add(id);
|
toDelete.add(id);
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.info("Entry #{}({}) in `plot_trusted` does not exist."
|
logger.info("[P2] Entry #{}({}) in `plot_trusted` does not exist."
|
||||||
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1903,7 +1903,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
||||||
toDelete.add(id);
|
toDelete.add(id);
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.info("Entry #{}({}) in `plot_denied` does not exist."
|
logger.info("[P2] Entry #{}({}) in `plot_denied` does not exist."
|
||||||
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1931,8 +1931,8 @@ public class SQLManager implements AbstractDB {
|
|||||||
plot.getFlagContainer().addFlag(plotFlag.parse(value));
|
plot.getFlagContainer().addFlag(plotFlag.parse(value));
|
||||||
} catch (final FlagParseException e) {
|
} catch (final FlagParseException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error("Plot with ID {} has an invalid value:", id);
|
logger.error("[P2] Plot with ID {} has an invalid value:", id);
|
||||||
logger.error("Failed to parse flag '{}', value '{}': {}",
|
logger.error("[P2] Failed to parse flag '{}', value '{}': {}",
|
||||||
plotFlag.getName(), e.getValue(), e.getErrorMessage());
|
plotFlag.getName(), e.getValue(), e.getErrorMessage());
|
||||||
if (!invalidFlags.containsKey(plot)) {
|
if (!invalidFlags.containsKey(plot)) {
|
||||||
invalidFlags.put(plot, new ArrayList<>());
|
invalidFlags.put(plot, new ArrayList<>());
|
||||||
@ -1943,7 +1943,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
||||||
toDelete.add(id);
|
toDelete.add(id);
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.info("Entry #{}({}) in `plot_flags` does not exist."
|
logger.info("[P2] Entry #{}({}) in `plot_flags` does not exist."
|
||||||
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1999,7 +1999,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
} else if (Settings.Enabled_Components.DATABASE_PURGER) {
|
||||||
toDelete.add(id);
|
toDelete.add(id);
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.info("Entry #{}({}) in `plot_settings` does not exist."
|
logger.info("[P2] Entry #{}({}) in `plot_settings` does not exist."
|
||||||
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
+ " Create this plot or set `database-purger: true` in settings.yml", id, plot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2017,15 +2017,15 @@ public class SQLManager implements AbstractDB {
|
|||||||
String worldName = entry.getKey();
|
String worldName = entry.getKey();
|
||||||
invalidPlot = true;
|
invalidPlot = true;
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Warning! Found {} plots in DB for non existent world: '{}'",
|
logger.info("[P2] Warning! Found {} plots in DB for non existent world: '{}'",
|
||||||
entry.getValue().intValue(), worldName);
|
entry.getValue().intValue(), worldName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (invalidPlot && Settings.DEBUG) {
|
if (invalidPlot && Settings.DEBUG) {
|
||||||
logger.info("Warning! Please create the world(s) or remove the plots using the purge command");
|
logger.info("[P2] Warning! Please create the world(s) or remove the plots using the purge command");
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
logger.error("Failed to load plots", e);
|
logger.error("[P2] Failed to load plots", e);
|
||||||
}
|
}
|
||||||
return newPlots;
|
return newPlots;
|
||||||
}
|
}
|
||||||
@ -2066,7 +2066,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
preparedStatement.setInt(3, id2);
|
preparedStatement.setInt(3, id2);
|
||||||
preparedStatement.execute();
|
preparedStatement.execute();
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
logger.error("Failed to persist wap of {} and {}", plot1, plot2);
|
logger.error("[P2] Failed to persist wap of {} and {}", plot1, plot2);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
future.complete(false);
|
future.complete(false);
|
||||||
return;
|
return;
|
||||||
@ -2209,12 +2209,12 @@ public class SQLManager implements AbstractDB {
|
|||||||
commit();
|
commit();
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
logger.error("Failed to purge plots", e);
|
logger.error("[P2] Failed to purge plots", e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Successfully purged {} plots", uniqueIds.size());
|
logger.info("[P2] Successfully purged {} plots", uniqueIds.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -2238,7 +2238,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
purgeIds(ids);
|
purgeIds(ids);
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
logger.error("Failed to purge area '{}'", area);
|
logger.error("[P2] Failed to purge area '{}'", area);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
for (Iterator<PlotId> iterator = plots.iterator(); iterator.hasNext(); ) {
|
for (Iterator<PlotId> iterator = plots.iterator(); iterator.hasNext(); ) {
|
||||||
@ -2495,7 +2495,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
logger.error("Failed to fetch rating for plot {}", plot.getId().toString());
|
logger.error("[P2] Failed to fetch rating for plot {}", plot.getId().toString());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
@ -2716,7 +2716,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.helpers.add(user);
|
cluster.helpers.add(user);
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.warn("Cluster #{}({}) in cluster_helpers does not exist."
|
logger.warn("[P2] Cluster #{}({}) in cluster_helpers does not exist."
|
||||||
+ " Please create the cluster or remove this entry", id, cluster);
|
+ " Please create the cluster or remove this entry", id, cluster);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2735,7 +2735,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
if (cluster != null) {
|
if (cluster != null) {
|
||||||
cluster.invited.add(user);
|
cluster.invited.add(user);
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.warn("Cluster #{}({}) in cluster_helpers does not exist."
|
logger.warn("[P2] Cluster #{}({}) in cluster_helpers does not exist."
|
||||||
+ " Please create the cluster or remove this entry", id, cluster);
|
+ " Please create the cluster or remove this entry", id, cluster);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2770,7 +2770,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
}
|
}
|
||||||
cluster.settings.setMerged(merged);
|
cluster.settings.setMerged(merged);
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.warn("Cluster #{}({}) in cluster_helpers does not exist."
|
logger.warn("[P2] Cluster #{}({}) in cluster_helpers does not exist."
|
||||||
+ " Please create the cluster or remove this entry", id, cluster);
|
+ " Please create the cluster or remove this entry", id, cluster);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2780,13 +2780,13 @@ public class SQLManager implements AbstractDB {
|
|||||||
for (Entry<String, Integer> entry : noExist.entrySet()) {
|
for (Entry<String, Integer> entry : noExist.entrySet()) {
|
||||||
String a = entry.getKey();
|
String a = entry.getKey();
|
||||||
invalidPlot = true;
|
invalidPlot = true;
|
||||||
logger.warn("Warning! Found {} clusters in DB for non existent area; '{}'", noExist.get(a), a);
|
logger.warn("[P2] Warning! Found {} clusters in DB for non existent area; '{}'", noExist.get(a), a);
|
||||||
}
|
}
|
||||||
if (invalidPlot) {
|
if (invalidPlot) {
|
||||||
logger.warn("Warning! Please create the world(s) or remove the clusters using the purge command");
|
logger.warn("[P2] Warning! Please create the world(s) or remove the clusters using the purge command");
|
||||||
}
|
}
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
logger.error("Failed to load clusters", e);
|
logger.error("[P2] Failed to load clusters", e);
|
||||||
}
|
}
|
||||||
return newClusters;
|
return newClusters;
|
||||||
}
|
}
|
||||||
@ -2978,7 +2978,7 @@ public class SQLManager implements AbstractDB {
|
|||||||
if (!isValid()) {
|
if (!isValid()) {
|
||||||
reconnect();
|
reconnect();
|
||||||
}
|
}
|
||||||
logger.info("All DB transactions during this session are being validated (This may take a while if corrections need to be made)");
|
logger.info("[P2] All DB transactions during this session are being validated (This may take a while if corrections need to be made)");
|
||||||
commit();
|
commit();
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!sendBatch()) {
|
if (!sendBatch()) {
|
||||||
@ -2999,13 +2999,13 @@ public class SQLManager implements AbstractDB {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (plot.getArea() == null) {
|
if (plot.getArea() == null) {
|
||||||
logger.error("CRITICAL ERROR IN VALIDATION TASK!");
|
logger.error("[P2] CRITICAL ERROR IN VALIDATION TASK!");
|
||||||
logger.error("PLOT AREA CANNOT BE NULL! SKIPPING PLOT!");
|
logger.error("[P2] PLOT AREA CANNOT BE NULL! SKIPPING PLOT!");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (database == null) {
|
if (database == null) {
|
||||||
logger.error("CRITICAL ERROR IN VALIDATION TASK!");
|
logger.error("[P2] CRITICAL ERROR IN VALIDATION TASK!");
|
||||||
logger.error("DATABASE VARIABLE CANNOT BE NULL! NOW ENDING VALIDATION!");
|
logger.error("[P2] DATABASE VARIABLE CANNOT BE NULL! NOW ENDING VALIDATION!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
HashMap<PlotId, Plot> worldPlots = database.get(plot.getArea().toString());
|
HashMap<PlotId, Plot> worldPlots = database.get(plot.getArea().toString());
|
||||||
|
@ -68,7 +68,7 @@ public class SQLite extends Database {
|
|||||||
try {
|
try {
|
||||||
file.createNewFile();
|
file.createNewFile();
|
||||||
} catch (IOException ignored) {
|
} catch (IOException ignored) {
|
||||||
logger.error("Unable to create database");
|
logger.error("[P2] Unable to create database");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Class.forName("org.sqlite.JDBC");
|
Class.forName("org.sqlite.JDBC");
|
||||||
|
@ -164,7 +164,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
|
|
||||||
// Dump world settings
|
// Dump world settings
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("- Dumping settings for ClassicPlotWorld with name {}", this.getWorldName());
|
logger.info("[P2] - Dumping settings for ClassicPlotWorld with name {}", this.getWorldName());
|
||||||
final Field[] fields = this.getClass().getFields();
|
final Field[] fields = this.getClass().getFields();
|
||||||
for (final Field field : fields) {
|
for (final Field field : fields) {
|
||||||
final String name = field.getName().toLowerCase(Locale.ENGLISH);
|
final String name = field.getName().toLowerCase(Locale.ENGLISH);
|
||||||
@ -180,7 +180,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
} catch (final IllegalAccessException e) {
|
} catch (final IllegalAccessException e) {
|
||||||
value = String.format("Failed to parse: %s", e.getMessage());
|
value = String.format("Failed to parse: %s", e.getMessage());
|
||||||
}
|
}
|
||||||
logger.info("-- {} = {}", name, value);
|
logger.info("[P2] -- {} = {}", name, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -282,12 +282,12 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - plot schematic: {}", schematic3File.getPath());
|
logger.info("[P2] - plot schematic: {}", schematic3File.getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (schematic1 == null || schematic2 == null || this.ROAD_WIDTH == 0) {
|
if (schematic1 == null || schematic2 == null || this.ROAD_WIDTH == 0) {
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - schematic: false");
|
logger.info("[P2] - schematic: false");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -364,7 +364,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
int pair = MathMan.pair(x, z);
|
int pair = MathMan.pair(x, z);
|
||||||
BaseBlock[] existing = this.G_SCH.computeIfAbsent(pair, k -> new BaseBlock[height]);
|
BaseBlock[] existing = this.G_SCH.computeIfAbsent(pair, k -> new BaseBlock[height]);
|
||||||
if (y >= height) {
|
if (y >= height) {
|
||||||
logger.error("Error adding overlay block. `y > height`");
|
logger.error("[P2] Error adding overlay block. `y > height`");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
existing[y] = id;
|
existing[y] = id;
|
||||||
|
@ -413,24 +413,24 @@ public abstract class HybridUtils {
|
|||||||
iter.remove();
|
iter.remove();
|
||||||
boolean regenedRoad = regenerateRoad(area, chunk, extend);
|
boolean regenedRoad = regenerateRoad(area, chunk, extend);
|
||||||
if (!regenedRoad && Settings.DEBUG) {
|
if (!regenedRoad && Settings.DEBUG) {
|
||||||
logger.info("Failed to regenerate roads");
|
logger.info("[P2] Failed to regenerate roads");
|
||||||
}
|
}
|
||||||
ChunkManager.manager.unloadChunk(area.getWorldName(), chunk, true);
|
ChunkManager.manager.unloadChunk(area.getWorldName(), chunk, true);
|
||||||
}
|
}
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Cancelled road task");
|
logger.info("[P2] Cancelled road task");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
count.incrementAndGet();
|
count.incrementAndGet();
|
||||||
if (count.intValue() % 20 == 0) {
|
if (count.intValue() % 20 == 0) {
|
||||||
logger.info("Progress: {}%", 100 * (2048 - chunks.size()) / 2048);
|
logger.info("[P2] Progress: {}%", 100 * (2048 - chunks.size()) / 2048);
|
||||||
}
|
}
|
||||||
if (HybridUtils.regions.isEmpty() && chunks.isEmpty()) {
|
if (HybridUtils.regions.isEmpty() && chunks.isEmpty()) {
|
||||||
regeneratePlotWalls(area);
|
regeneratePlotWalls(area);
|
||||||
|
|
||||||
HybridUtils.UPDATE = false;
|
HybridUtils.UPDATE = false;
|
||||||
logger.info("Finished road conversion");
|
logger.info("[P2] Finished road conversion");
|
||||||
// CANCEL TASK
|
// CANCEL TASK
|
||||||
} else {
|
} else {
|
||||||
final Runnable task = this;
|
final Runnable task = this;
|
||||||
@ -443,9 +443,9 @@ public abstract class HybridUtils {
|
|||||||
BlockVector2 loc = iterator.next();
|
BlockVector2 loc = iterator.next();
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Updating .mcr: {}, {} (approx 1024 chunks)",
|
logger.info("[P2] Updating .mcr: {}, {} (approx 1024 chunks)",
|
||||||
loc.getX(), loc.getZ());
|
loc.getX(), loc.getZ());
|
||||||
logger.info("- Remaining: {}", HybridUtils.regions.size());
|
logger.info("[P2] - Remaining: {}", HybridUtils.regions.size());
|
||||||
}
|
}
|
||||||
chunks.addAll(getChunks(loc));
|
chunks.addAll(getChunks(loc));
|
||||||
System.gc();
|
System.gc();
|
||||||
@ -463,7 +463,7 @@ public abstract class HybridUtils {
|
|||||||
boolean regenedRoads =
|
boolean regenedRoads =
|
||||||
regenerateRoad(area, chunk, extend);
|
regenerateRoad(area, chunk, extend);
|
||||||
if (!regenedRoads && Settings.DEBUG) {
|
if (!regenedRoads && Settings.DEBUG) {
|
||||||
logger.info("Failed to regenerate road");
|
logger.info("[P2] Failed to regenerate road");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -474,7 +474,7 @@ public abstract class HybridUtils {
|
|||||||
Iterator<BlockVector2> iterator = HybridUtils.regions.iterator();
|
Iterator<BlockVector2> iterator = HybridUtils.regions.iterator();
|
||||||
BlockVector2 loc = iterator.next();
|
BlockVector2 loc = iterator.next();
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
logger.error("Error! Could not update '{}/region/r.{}.{}.mca' (Corrupt chunk?)",
|
logger.error("[P2] Error! Could not update '{}/region/r.{}.{}.mca' (Corrupt chunk?)",
|
||||||
area.getWorldHash(), loc.getX(), loc.getZ());
|
area.getWorldHash(), loc.getX(), loc.getZ());
|
||||||
int sx = loc.getX() << 5;
|
int sx = loc.getX() << 5;
|
||||||
int sz = loc.getZ() << 5;
|
int sz = loc.getZ() << 5;
|
||||||
|
@ -49,7 +49,7 @@ public abstract class SquarePlotWorld extends GridPlotWorld {
|
|||||||
@Override public void loadConfiguration(ConfigurationSection config) {
|
@Override public void loadConfiguration(ConfigurationSection config) {
|
||||||
if (!config.contains("plot.height")) {
|
if (!config.contains("plot.height")) {
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - Configuration is null? ({})", config.getCurrentPath());
|
logger.info("[P2] - Configuration is null? ({})", config.getCurrentPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -585,7 +585,7 @@ public abstract class PlotPlayer<P> implements CommandCaller, OfflinePlotPlayer
|
|||||||
for (Plot owned : getPlots()) {
|
for (Plot owned : getPlots()) {
|
||||||
owned.deletePlot(null);
|
owned.deletePlot(null);
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Plot {} was deleted + cleared due to {} getting banned", owned.getId(), getName());
|
logger.info("[P2] Plot {} was deleted + cleared due to {} getting banned", owned.getId(), getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1745,7 +1745,7 @@ public class Plot {
|
|||||||
|
|
||||||
if (updateDB) {
|
if (updateDB) {
|
||||||
if (!create(player.getUUID(), true)) {
|
if (!create(player.getUUID(), true)) {
|
||||||
logger.error("Player {} attempted to claim plot {}, but the database failed to update",
|
logger.error("[P2] Player {} attempted to claim plot {}, but the database failed to update",
|
||||||
player.getName(), this.getId().toCommaSeparatedString());
|
player.getName(), this.getId().toCommaSeparatedString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1833,7 +1833,7 @@ public class Plot {
|
|||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
logger.info("Failed to add plot {} to plot area {}",
|
logger.info("[P2] Failed to add plot {} to plot area {}",
|
||||||
this.getId().toCommaSeparatedString(), this.area.toString());
|
this.getId().toCommaSeparatedString(), this.area.toString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1063,7 +1063,7 @@ public abstract class PlotArea {
|
|||||||
try {
|
try {
|
||||||
flags.add(flagInstance.parse(split[1]));
|
flags.add(flagInstance.parse(split[1]));
|
||||||
} catch (final FlagParseException e) {
|
} catch (final FlagParseException e) {
|
||||||
logger.warn("Failed to parse default flag with key '{}' and value '{}'. "
|
logger.warn("[P2] Failed to parse default flag with key '{}' and value '{}'. "
|
||||||
+ "Reason: {}. This flag will not be added as a default flag.",
|
+ "Reason: {}. This flag will not be added as a default flag.",
|
||||||
e.getFlag().getName(),
|
e.getFlag().getName(),
|
||||||
e.getValue(),
|
e.getValue(),
|
||||||
|
@ -97,7 +97,7 @@ public class PlotAnalysis {
|
|||||||
public static void calcOptimalModifiers(final Runnable whenDone, final double threshold) {
|
public static void calcOptimalModifiers(final Runnable whenDone, final double threshold) {
|
||||||
if (running) {
|
if (running) {
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Calibration task already in progress!");
|
logger.info("[P2] Calibration task already in progress!");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -114,7 +114,7 @@ public class PlotAnalysis {
|
|||||||
@Override public void run() {
|
@Override public void run() {
|
||||||
Iterator<Plot> iterator = plots.iterator();
|
Iterator<Plot> iterator = plots.iterator();
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("- Reducing {} plots to those with sufficient data", plots.size());
|
logger.info("[P2] - Reducing {} plots to those with sufficient data", plots.size());
|
||||||
}
|
}
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
Plot plot = iterator.next();
|
Plot plot = iterator.next();
|
||||||
@ -139,7 +139,7 @@ public class PlotAnalysis {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("- Analyzing plot contents (this may take a while)");
|
logger.info("[P2] - Analyzing plot contents (this may take a while)");
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] changes = new int[plots.size()];
|
int[] changes = new int[plots.size()];
|
||||||
@ -167,7 +167,7 @@ public class PlotAnalysis {
|
|||||||
(plot.getAverageRating() + plot.getSettings().getRatings().size())
|
(plot.getAverageRating() + plot.getSettings().getRatings().size())
|
||||||
* 100);
|
* 100);
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" | {} (rating) {}", plot, ratings[i]);
|
logger.info("[P2] | {} (rating) {}", plot, ratings[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -181,7 +181,7 @@ public class PlotAnalysis {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" | {}", queuePlot);
|
logger.info("[P2] | {}", queuePlot);
|
||||||
}
|
}
|
||||||
final Object lock = new Object();
|
final Object lock = new Object();
|
||||||
TaskManager.runTask(new Runnable() {
|
TaskManager.runTask(new Runnable() {
|
||||||
@ -213,7 +213,7 @@ public class PlotAnalysis {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - Waiting on plot rating thread: {}%", mi.intValue() * 100 / plots.size());
|
logger.info("[P2] - Waiting on plot rating thread: {}%", mi.intValue() * 100 / plots.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -229,7 +229,7 @@ public class PlotAnalysis {
|
|||||||
for (int i = 0; i < plots.size(); i++) {
|
for (int i = 0; i < plots.size(); i++) {
|
||||||
Plot plot = plots.get(i);
|
Plot plot = plots.get(i);
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" | {}", plot);
|
logger.info("[P2] | {}", plot);
|
||||||
}
|
}
|
||||||
PlotAnalysis analysis = plot.getComplexity(null);
|
PlotAnalysis analysis = plot.getComplexity(null);
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ public class PlotAnalysis {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - Calculating rankings");
|
logger.info("[P2] - Calculating rankings");
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] rankRatings = rank(ratings);
|
int[] rankRatings = rank(ratings);
|
||||||
@ -256,7 +256,7 @@ public class PlotAnalysis {
|
|||||||
int optimalIndex = (int) Math.round((1 - threshold) * (n - 1));
|
int optimalIndex = (int) Math.round((1 - threshold) * (n - 1));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - Calculating rank correlation: ");
|
logger.info("[P2] - Calculating rank correlation: ");
|
||||||
logger.info(
|
logger.info(
|
||||||
" - The analyzed plots which were processed and put into bulk data will be compared and correlated to the plot ranking");
|
" - The analyzed plots which were processed and put into bulk data will be compared and correlated to the plot ranking");
|
||||||
logger.info(
|
logger.info(
|
||||||
@ -275,7 +275,7 @@ public class PlotAnalysis {
|
|||||||
(int) (factorChanges * 1000 / MathMan.getMean(changes));
|
(int) (factorChanges * 1000 / MathMan.getMean(changes));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - | changes {}", factorChanges);
|
logger.info("[P2] - | changes {}", factorChanges);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] rankFaces = rank(faces);
|
int[] rankFaces = rank(faces);
|
||||||
@ -287,7 +287,7 @@ public class PlotAnalysis {
|
|||||||
factorFaces == 1 ? 0 : (int) (factorFaces * 1000 / MathMan.getMean(faces));
|
factorFaces == 1 ? 0 : (int) (factorFaces * 1000 / MathMan.getMean(faces));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - | faces {}", factorFaces);
|
logger.info("[P2] - | faces {}", factorFaces);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] rankData = rank(data);
|
int[] rankData = rank(data);
|
||||||
@ -299,7 +299,7 @@ public class PlotAnalysis {
|
|||||||
factor_data == 1 ? 0 : (int) (factor_data * 1000 / MathMan.getMean(data));
|
factor_data == 1 ? 0 : (int) (factor_data * 1000 / MathMan.getMean(data));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - | data {}", factor_data);
|
logger.info("[P2] - | data {}", factor_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] rank_air = rank(air);
|
int[] rank_air = rank(air);
|
||||||
@ -311,7 +311,7 @@ public class PlotAnalysis {
|
|||||||
factor_air == 1 ? 0 : (int) (factor_air * 1000 / MathMan.getMean(air));
|
factor_air == 1 ? 0 : (int) (factor_air * 1000 / MathMan.getMean(air));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("- | air {}", factor_air);
|
logger.info("[P2] - | air {}", factor_air);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] rank_variety = rank(variety);
|
int[] rank_variety = rank(variety);
|
||||||
@ -324,7 +324,7 @@ public class PlotAnalysis {
|
|||||||
(int) (factor_variety * 1000 / MathMan.getMean(variety));
|
(int) (factor_variety * 1000 / MathMan.getMean(variety));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("- | variety {}", factor_variety);
|
logger.info("[P2] - | variety {}", factor_variety);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] rank_changes_sd = rank(changes_sd);
|
int[] rank_changes_sd = rank(changes_sd);
|
||||||
@ -337,7 +337,7 @@ public class PlotAnalysis {
|
|||||||
(int) (factor_changes_sd * 1000 / MathMan.getMean(changes_sd));
|
(int) (factor_changes_sd * 1000 / MathMan.getMean(changes_sd));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - | changed_sd {}", factor_changes_sd);
|
logger.info("[P2] - | changed_sd {}", factor_changes_sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] rank_faces_sd = rank(faces_sd);
|
int[] rank_faces_sd = rank(faces_sd);
|
||||||
@ -350,7 +350,7 @@ public class PlotAnalysis {
|
|||||||
(int) (factor_faces_sd * 1000 / MathMan.getMean(faces_sd));
|
(int) (factor_faces_sd * 1000 / MathMan.getMean(faces_sd));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - | faced_sd {}", factor_faces_sd);
|
logger.info("[P2] - | faced_sd {}", factor_faces_sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] rank_data_sd = rank(data_sd);
|
int[] rank_data_sd = rank(data_sd);
|
||||||
@ -363,7 +363,7 @@ public class PlotAnalysis {
|
|||||||
(int) (factor_data_sd * 1000 / MathMan.getMean(data_sd));
|
(int) (factor_data_sd * 1000 / MathMan.getMean(data_sd));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - | data_sd {}", factor_data_sd);
|
logger.info("[P2] - | data_sd {}", factor_data_sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] rank_air_sd = rank(air_sd);
|
int[] rank_air_sd = rank(air_sd);
|
||||||
@ -375,7 +375,7 @@ public class PlotAnalysis {
|
|||||||
factor_air_sd == 1 ? 0 : (int) (factor_air_sd * 1000 / MathMan.getMean(air_sd));
|
factor_air_sd == 1 ? 0 : (int) (factor_air_sd * 1000 / MathMan.getMean(air_sd));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - | air_sd {}", factor_air_sd);
|
logger.info("[P2] - | air_sd {}", factor_air_sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] rank_variety_sd = rank(variety_sd);
|
int[] rank_variety_sd = rank(variety_sd);
|
||||||
@ -388,13 +388,13 @@ public class PlotAnalysis {
|
|||||||
(int) (factor_variety_sd * 1000 / MathMan.getMean(variety_sd));
|
(int) (factor_variety_sd * 1000 / MathMan.getMean(variety_sd));
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" - | variety_sd {}", factor_variety_sd);
|
logger.info("[P2] - | variety_sd {}", factor_variety_sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] complexity = new int[n];
|
int[] complexity = new int[n];
|
||||||
|
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" Calculating threshold");
|
logger.info("[P2] Calculating threshold");
|
||||||
}
|
}
|
||||||
|
|
||||||
int max = 0;
|
int max = 0;
|
||||||
@ -426,7 +426,7 @@ public class PlotAnalysis {
|
|||||||
logln(getCC(n, sum(square(getSD(rankComplexity, rankRatings)))));
|
logln(getCC(n, sum(square(getSD(rankComplexity, rankRatings)))));
|
||||||
if (optimalComplexity == Integer.MAX_VALUE) {
|
if (optimalComplexity == Integer.MAX_VALUE) {
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Insufficient data to determine correlation! {} | {}",
|
logger.info("[P2] Insufficient data to determine correlation! {} | {}",
|
||||||
optimalIndex, n);
|
optimalIndex, n);
|
||||||
}
|
}
|
||||||
running = false;
|
running = false;
|
||||||
@ -447,7 +447,7 @@ public class PlotAnalysis {
|
|||||||
|
|
||||||
// Save calibration
|
// Save calibration
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" Saving calibration");
|
logger.info("[P2] Saving calibration");
|
||||||
}
|
}
|
||||||
Settings.AUTO_CLEAR.put("auto-calibrated", settings);
|
Settings.AUTO_CLEAR.put("auto-calibrated", settings);
|
||||||
Settings.save(PlotSquared.get().worldsFile);
|
Settings.save(PlotSquared.get().worldsFile);
|
||||||
@ -456,7 +456,7 @@ public class PlotAnalysis {
|
|||||||
plot.removeRunning();
|
plot.removeRunning();
|
||||||
}
|
}
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(" Done!");
|
logger.info("[P2] Done!");
|
||||||
}
|
}
|
||||||
whenDone.run();
|
whenDone.run();
|
||||||
}
|
}
|
||||||
@ -465,7 +465,7 @@ public class PlotAnalysis {
|
|||||||
|
|
||||||
public static void logln(Object obj) {
|
public static void logln(Object obj) {
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info(log(obj));
|
logger.info("[P2] " + log(obj));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ import java.util.Map;
|
|||||||
this.updateSubscribers
|
this.updateSubscribers
|
||||||
.forEach(subscriber -> subscriber.handle(flag, plotFlagUpdateType));
|
.forEach(subscriber -> subscriber.handle(flag, plotFlagUpdateType));
|
||||||
} catch (IllegalStateException e) {
|
} catch (IllegalStateException e) {
|
||||||
logger.info("Flag {} (class '{}') could not be added to the container because the "
|
logger.info("[P2] Flag {} (class '{}') could not be added to the container because the "
|
||||||
+ "flag name exceeded the allowed limit of 64 characters. Please tell the developer "
|
+ "flag name exceeded the allowed limit of 64 characters. Please tell the developer "
|
||||||
+ "of the flag to fix this.", flag.getName(), flag.getClass().getName());
|
+ "of the flag to fix this.", flag.getName(), flag.getClass().getName());
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -134,7 +134,7 @@ public class BlockTypeWrapper {
|
|||||||
this.blockCategory = BlockCategory.REGISTRY.get(this.blockCategoryId);
|
this.blockCategory = BlockCategory.REGISTRY.get(this.blockCategoryId);
|
||||||
if (this.blockCategory == null && !BlockCategory.REGISTRY.values().isEmpty()) {
|
if (this.blockCategory == null && !BlockCategory.REGISTRY.values().isEmpty()) {
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("- Block category #{} does not exist", this.blockCategoryId);
|
logger.info("[P2] - Block category #{} does not exist", this.blockCategoryId);
|
||||||
}
|
}
|
||||||
this.blockCategory = new NullBlockCategory(this.blockCategoryId);
|
this.blockCategory = new NullBlockCategory(this.blockCategoryId);
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ public class PlotMessage {
|
|||||||
try {
|
try {
|
||||||
reset(ChatManager.manager);
|
reset(ChatManager.manager);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
logger.error("{} doesn't support fancy chat for {}", PlotSquared.imp().getPluginName(), PlotSquared.get().IMP.getServerVersion());
|
logger.error("[P2] {} doesn't support fancy chat for {}", PlotSquared.imp().getPluginName(), PlotSquared.get().IMP.getServerVersion());
|
||||||
ChatManager.manager = new PlainChatManager();
|
ChatManager.manager = new PlainChatManager();
|
||||||
reset(ChatManager.manager);
|
reset(ChatManager.manager);
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ public abstract class Expression<T> {
|
|||||||
return (Double) exec.getEngine().eval(expression.replace("{arg}", "" + arg));
|
return (Double) exec.getEngine().eval(expression.replace("{arg}", "" + arg));
|
||||||
} catch (ScriptException e) {
|
} catch (ScriptException e) {
|
||||||
if (Settings.DEBUG) {
|
if (Settings.DEBUG) {
|
||||||
logger.info("Invalid expression: {}", expression);
|
logger.info("[P2] Invalid expression: {}", expression);
|
||||||
}
|
}
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -521,7 +521,7 @@ public class MainUtil {
|
|||||||
if (arg == null) {
|
if (arg == null) {
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
if (message) {
|
if (message) {
|
||||||
logger.info("No plot area string was supplied");
|
logger.info("[P2] No plot area string was supplied");
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ public abstract class RegionManager {
|
|||||||
world + File.separator + "region" + File.separator + "r." + loc.getX() + "."
|
world + File.separator + "region" + File.separator + "r." + loc.getX() + "."
|
||||||
+ loc.getZ() + ".mca";
|
+ loc.getZ() + ".mca";
|
||||||
File file = new File(PlotSquared.get().IMP.getWorldContainer(), directory);
|
File file = new File(PlotSquared.get().IMP.getWorldContainer(), directory);
|
||||||
logger.info("- Deleting file: {} (max 1024 chunks)", file.getName());
|
logger.info("[P2] - Deleting file: {} (max 1024 chunks)", file.getName());
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
file.delete();
|
file.delete();
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ public abstract class SchematicHandler {
|
|||||||
boolean result = SchematicHandler.manager
|
boolean result = SchematicHandler.manager
|
||||||
.save(value, directory + File.separator + name + ".schem");
|
.save(value, directory + File.separator + name + ".schem");
|
||||||
if (!result) {
|
if (!result) {
|
||||||
logger.error("Failed to save {}", plot.getId());
|
logger.error("[P2] Failed to save {}", plot.getId());
|
||||||
}
|
}
|
||||||
TaskManager.runTask(THIS);
|
TaskManager.runTask(THIS);
|
||||||
});
|
});
|
||||||
|
@ -161,7 +161,7 @@ public final class IncendoPaster {
|
|||||||
if (!httpURLConnection.getResponseMessage().contains("OK")) {
|
if (!httpURLConnection.getResponseMessage().contains("OK")) {
|
||||||
if (httpURLConnection.getResponseCode() == 413) {
|
if (httpURLConnection.getResponseCode() == 413) {
|
||||||
final long size = content.length;
|
final long size = content.length;
|
||||||
logger.error("Paste too big > size: {}MB", size / 1_000_000);
|
logger.error("[P2] Paste too big > size: {}MB", size / 1_000_000);
|
||||||
}
|
}
|
||||||
throw new IllegalStateException(String
|
throw new IllegalStateException(String
|
||||||
.format("Server returned status: %d %s", httpURLConnection.getResponseCode(),
|
.format("Server returned status: %d %s", httpURLConnection.getResponseCode(),
|
||||||
|
@ -168,7 +168,7 @@ public class UUIDPipeline {
|
|||||||
} catch (InterruptedException | ExecutionException e) {
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (TimeoutException ignored) {
|
} catch (TimeoutException ignored) {
|
||||||
logger.warn("(UUID) Request for {} timed out", username);
|
logger.warn("[P2] (UUID) Request for {} timed out", username);
|
||||||
// This is completely valid, we just don't care anymore
|
// This is completely valid, we just don't care anymore
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@ -191,7 +191,7 @@ public class UUIDPipeline {
|
|||||||
} catch (InterruptedException | ExecutionException e) {
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (TimeoutException ignored) {
|
} catch (TimeoutException ignored) {
|
||||||
logger.warn("(UUID) Request for {} timed out", uuid);
|
logger.warn("[P2] (UUID) Request for {} timed out", uuid);
|
||||||
// This is completely valid, we just don't care anymore
|
// This is completely valid, we just don't care anymore
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@ -325,7 +325,7 @@ public class UUIDPipeline {
|
|||||||
this.consume(mappings);
|
this.consume(mappings);
|
||||||
return mappings;
|
return mappings;
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.info("(UUID) Failed to find all usernames");
|
logger.info("[P2] (UUID) Failed to find all usernames");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.UUID.UNKNOWN_AS_DEFAULT) {
|
if (Settings.UUID.UNKNOWN_AS_DEFAULT) {
|
||||||
@ -388,7 +388,7 @@ public class UUIDPipeline {
|
|||||||
this.consume(mappings);
|
this.consume(mappings);
|
||||||
return mappings;
|
return mappings;
|
||||||
} else if (Settings.DEBUG) {
|
} else if (Settings.DEBUG) {
|
||||||
logger.info("(UUID) Failed to find all UUIDs");
|
logger.info("[P2] (UUID) Failed to find all UUIDs");
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new ServiceError("End of pipeline");
|
throw new ServiceError("End of pipeline");
|
||||||
|
Loading…
Reference in New Issue
Block a user