From f4bc6fb407d099a9500f130556c90a085d6d0940 Mon Sep 17 00:00:00 2001 From: okx-code Date: Sat, 23 Mar 2024 20:36:59 +0000 Subject: [PATCH] fix messages --- .../locations/chunkmeta/WorldChunkMetaManager.java | 14 ++++---------- .../block/table/TableBasedBlockChunkMeta.java | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/world/locations/chunkmeta/WorldChunkMetaManager.java b/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/world/locations/chunkmeta/WorldChunkMetaManager.java index ff52be7ba..7a395be07 100644 --- a/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/world/locations/chunkmeta/WorldChunkMetaManager.java +++ b/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/world/locations/chunkmeta/WorldChunkMetaManager.java @@ -230,7 +230,7 @@ public class WorldChunkMetaManager { } if (System.currentTimeMillis() - coord.getLastUnloadedTime() > UNLOAD_DELAY) { - CHUNK_META_LOGGER.fine("[Chunkmeta] Unloading chunk " + coord + " - unloaded: " + coord.getLastUnloadedTime()); + CHUNK_META_LOGGER.fine("Unloading chunk " + coord + " - unloaded: " + coord.getLastUnloadedTime()); unloadChunkCoord(coord); } else { if (readdList == null) { @@ -241,9 +241,7 @@ public class WorldChunkMetaManager { } } if (readdList != null) { - if (ChunkMetaCommand.chunkMetaLogsEnabled()) { - CHUNK_META_LOGGER.fine("[Chunkmeta] Unloaded chunks remaining unsaved: " + readdList); - } + CHUNK_META_LOGGER.fine("Unloaded chunks remaining unsaved: " + readdList); unloadingQueue.addAll(readdList); } }, UNLOAD_CHECK_INTERVAL, UNLOAD_CHECK_INTERVAL, TimeUnit.MILLISECONDS); @@ -273,9 +271,7 @@ public class WorldChunkMetaManager { // written to the db synchronized (metas) { if (coord.isUnloaded()) { - if (ChunkMetaCommand.chunkMetaLogsEnabled()) { - CHUNK_META_LOGGER.fine("[Chunkmeta] Chunk no longer being tracked: " + coord); - } + CHUNK_META_LOGGER.fine("Chunk no longer being tracked: " + coord); metas.remove(coord); coord.clearUnloaded(); } @@ -322,9 +318,7 @@ public class WorldChunkMetaManager { */ void unloadChunk(int x, int z) { ChunkCoord chunkCoord = getChunkCoord(x, z, false, false); - if (ChunkMetaCommand.chunkMetaLogsEnabled()) { - CHUNK_META_LOGGER.fine("[Chunkmeta] Add to unloading queue: " + chunkCoord); - } + CHUNK_META_LOGGER.fine("Add to unloading queue: " + chunkCoord); // chunkCoord can never be null here, otherwise our data structure would be // broken, in which case we'd want to know chunkCoord.minecraftChunkUnloaded(); diff --git a/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/world/locations/chunkmeta/block/table/TableBasedBlockChunkMeta.java b/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/world/locations/chunkmeta/block/table/TableBasedBlockChunkMeta.java index ddc981b93..0e1559dd2 100644 --- a/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/world/locations/chunkmeta/block/table/TableBasedBlockChunkMeta.java +++ b/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/world/locations/chunkmeta/block/table/TableBasedBlockChunkMeta.java @@ -54,7 +54,7 @@ public abstract class TableBasedBlockChunkMeta @Override public void insert() { - CHUNK_META_LOGGER.fine("[Chunkmeta] Inserting at " + chunkCoord); + CHUNK_META_LOGGER.fine("Inserting at " + chunkCoord); for (D data : modifiedEntries) { switch (data.getCacheState()) { case NORMAL: