mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-05 20:36:42 +00:00
Update Upstream
609c7b8 Scrapped Logging Framework 4 Java Closes #997 Closes #998 Closes #999 Closes #1000 Closes #1001 Closes #1002
This commit is contained in:
@ -25,8 +25,6 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.slf4j.LoggerFactory.getLogger;
|
||||
|
||||
public class BlockTypesCache {
|
||||
/*
|
||||
-----------------------------------------------------
|
||||
|
@ -28,11 +28,11 @@ import com.google.gson.reflect.TypeToken;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.internal.Constants;
|
||||
import com.sk89q.worldedit.internal.util.LogManagerCompat;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.util.gson.VectorAdapter;
|
||||
import com.sk89q.worldedit.util.io.ResourceLoader;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
@ -55,7 +55,7 @@ import javax.annotation.Nullable;
|
||||
*/
|
||||
public final class BundledBlockData {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(BundledBlockData.class);
|
||||
private static final Logger LOGGER = LogManagerCompat.getLogger();
|
||||
private static BundledBlockData INSTANCE;
|
||||
private final ResourceLoader resourceLoader;
|
||||
|
||||
@ -70,7 +70,7 @@ public final class BundledBlockData {
|
||||
try {
|
||||
loadFromResource();
|
||||
} catch (Throwable e) {
|
||||
log.warn("Failed to load the built-in block registry", e);
|
||||
LOGGER.warn("Failed to load the built-in block registry", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ public final class BundledBlockData {
|
||||
if (url == null) {
|
||||
throw new IOException("Could not find blocks.json");
|
||||
}
|
||||
log.debug("Using {} for bundled block data.", url);
|
||||
LOGGER.debug("Using {} for bundled block data.", url);
|
||||
String data = Resources.toString(url, Charset.defaultCharset());
|
||||
List<BlockEntry> entries = gson.fromJson(data, new TypeToken<List<BlockEntry>>() {}.getType());
|
||||
|
||||
|
@ -26,11 +26,11 @@ import com.google.gson.reflect.TypeToken;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.internal.Constants;
|
||||
import com.sk89q.worldedit.internal.util.LogManagerCompat;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.util.gson.VectorAdapter;
|
||||
import com.sk89q.worldedit.util.io.ResourceLoader;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
@ -53,7 +53,7 @@ import javax.annotation.Nullable;
|
||||
*/
|
||||
public final class BundledItemData {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(BundledItemData.class);
|
||||
private static final Logger LOGGER = LogManagerCompat.getLogger();
|
||||
private static BundledItemData INSTANCE;
|
||||
private final ResourceLoader resourceLoader;
|
||||
|
||||
@ -68,7 +68,7 @@ public final class BundledItemData {
|
||||
try {
|
||||
loadFromResource();
|
||||
} catch (Throwable e) {
|
||||
log.warn("Failed to load the built-in item registry", e);
|
||||
LOGGER.warn("Failed to load the built-in item registry", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ public final class BundledItemData {
|
||||
if (url == null) {
|
||||
throw new IOException("Could not find items.json");
|
||||
}
|
||||
log.debug("Using {} for bundled item data.", url);
|
||||
LOGGER.debug("Using {} for bundled item data.", url);
|
||||
String data = Resources.toString(url, Charset.defaultCharset());
|
||||
List<ItemEntry> entries = gson.fromJson(data, new TypeToken<List<ItemEntry>>() {}.getType());
|
||||
|
||||
|
@ -33,6 +33,7 @@ import com.sk89q.worldedit.extension.input.InputParseException;
|
||||
import com.sk89q.worldedit.extension.input.ParserContext;
|
||||
import com.sk89q.worldedit.extension.platform.Capability;
|
||||
import com.sk89q.worldedit.internal.Constants;
|
||||
import com.sk89q.worldedit.internal.util.LogManagerCompat;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.registry.state.PropertyKey;
|
||||
import com.sk89q.worldedit.util.gson.VectorAdapter;
|
||||
@ -44,8 +45,7 @@ import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.item.ItemType;
|
||||
import com.sk89q.worldedit.world.item.ItemTypes;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
@ -56,7 +56,7 @@ import javax.annotation.Nullable;
|
||||
|
||||
public final class LegacyMapper {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(LegacyMapper.class);
|
||||
private static final Logger LOGGER = LogManagerCompat.getLogger();
|
||||
private static LegacyMapper INSTANCE;
|
||||
private final ResourceLoader resourceLoader;
|
||||
|
||||
@ -79,7 +79,7 @@ public final class LegacyMapper {
|
||||
try {
|
||||
loadFromResource();
|
||||
} catch (Throwable e) {
|
||||
log.warn("Failed to load the built-in legacy id registry", e);
|
||||
LOGGER.warn("Failed to load the built-in legacy id registry", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ public final class LegacyMapper {
|
||||
|
||||
// if it's still null, both fixer and default failed
|
||||
if (state == null) {
|
||||
log.debug("Unknown block: " + value);
|
||||
LOGGER.debug("Unknown block: " + value);
|
||||
} else {
|
||||
// it's not null so one of them succeeded, now use it
|
||||
blockToStringMap.put(state, id);
|
||||
@ -174,7 +174,7 @@ public final class LegacyMapper {
|
||||
type = ItemTypes.get(value);
|
||||
}
|
||||
if (type == null) {
|
||||
log.debug("Unknown item: " + value);
|
||||
LOGGER.debug("Unknown item: " + value);
|
||||
} else {
|
||||
try {
|
||||
itemMap.put(getCombinedId(id), type);
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
package com.sk89q.worldedit.world.snapshot;
|
||||
|
||||
import com.sk89q.worldedit.internal.util.LogManagerCompat;
|
||||
import com.sk89q.worldedit.world.DataException;
|
||||
import com.sk89q.worldedit.world.storage.ChunkStore;
|
||||
import com.sk89q.worldedit.world.storage.FileLegacyChunkStore;
|
||||
@ -29,8 +30,7 @@ import com.sk89q.worldedit.world.storage.TrueZipLegacyChunkStore;
|
||||
import com.sk89q.worldedit.world.storage.TrueZipMcRegionChunkStore;
|
||||
import com.sk89q.worldedit.world.storage.ZippedLegacyChunkStore;
|
||||
import com.sk89q.worldedit.world.storage.ZippedMcRegionChunkStore;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -43,7 +43,7 @@ import java.util.zip.ZipFile;
|
||||
*/
|
||||
public class Snapshot implements Comparable<Snapshot> {
|
||||
|
||||
protected static Logger logger = LoggerFactory.getLogger(Snapshot.class);
|
||||
private static final Logger LOGGER = LogManagerCompat.getLogger();
|
||||
|
||||
protected File file;
|
||||
protected String name;
|
||||
@ -70,7 +70,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
||||
public ChunkStore getChunkStore() throws IOException, DataException {
|
||||
ChunkStore chunkStore = internalGetChunkStore();
|
||||
|
||||
logger.info("WorldEdit: Using " + chunkStore.getClass().getCanonicalName()
|
||||
LOGGER.info("WorldEdit: Using " + chunkStore.getClass().getCanonicalName()
|
||||
+ " for loading snapshot '" + file.getAbsolutePath() + "'");
|
||||
|
||||
return chunkStore;
|
||||
@ -156,7 +156,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
// Skip the file, but print an error
|
||||
logger.info("Could not load snapshot: "
|
||||
LOGGER.info("Could not load snapshot: "
|
||||
+ file.getPath());
|
||||
} catch (DataException ex) {
|
||||
// No truezip, so tar file not supported.
|
||||
|
Reference in New Issue
Block a user