mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 04:23:54 +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:
@ -20,7 +20,13 @@ repositories {
|
||||
dependencies {
|
||||
api(project(":worldedit-core"))
|
||||
api(project(":worldedit-libs:sponge"))
|
||||
api("org.spongepowered:spongeapi:7.1.0")
|
||||
api("org.spongepowered:spongeapi:7.1.0") {
|
||||
exclude(group = "org.slf4j", module = "slf4j-api")
|
||||
}
|
||||
implementation(enforcedPlatform("org.apache.logging.log4j:log4j-bom:2.8.1") {
|
||||
because("Sponge 8 provides Log4J at 2.8.1")
|
||||
})
|
||||
api("org.apache.logging.log4j:log4j-api")
|
||||
api("org.bstats:bstats-sponge:1.7")
|
||||
testImplementation("org.mockito:mockito-core:1.9.0-rc1")
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ import com.sk89q.worldedit.sponge.adapter.SpongeImplAdapter;
|
||||
import com.sk89q.worldedit.sponge.adapter.SpongeImplLoader;
|
||||
import com.sk89q.worldedit.sponge.config.SpongeConfiguration;
|
||||
import org.bstats.sponge.Metrics2;
|
||||
import org.slf4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.spongepowered.api.Sponge;
|
||||
import org.spongepowered.api.block.BlockSnapshot;
|
||||
import org.spongepowered.api.block.BlockType;
|
||||
|
@ -21,8 +21,8 @@ package com.sk89q.worldedit.sponge.adapter;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.sk89q.worldedit.util.io.Closer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import com.sk89q.worldedit.internal.util.LogManagerCompat;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -38,7 +38,7 @@ import java.util.jar.JarFile;
|
||||
*/
|
||||
public class SpongeImplLoader {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(SpongeImplLoader.class);
|
||||
private static final Logger LOGGER = LogManagerCompat.getLogger();
|
||||
private final List<String> adapterCandidates = new ArrayList<>();
|
||||
private String customCandidate;
|
||||
|
||||
@ -71,7 +71,7 @@ public class SpongeImplLoader {
|
||||
if (className != null) {
|
||||
customCandidate = className;
|
||||
adapterCandidates.add(className);
|
||||
log.info("-Dworldedit.sponge.adapter used to add " + className + " to the list of available Sponge adapters");
|
||||
LOGGER.info("-Dworldedit.sponge.adapter used to add " + className + " to the list of available Sponge adapters");
|
||||
}
|
||||
}
|
||||
|
||||
@ -157,18 +157,18 @@ public class SpongeImplLoader {
|
||||
if (SpongeImplAdapter.class.isAssignableFrom(cls)) {
|
||||
suitableAdapters.add((SpongeImplAdapter) cls.newInstance());
|
||||
} else {
|
||||
log.warn("Failed to load the Sponge adapter class '" + className +
|
||||
LOGGER.warn("Failed to load the Sponge adapter class '" + className +
|
||||
"' because it does not implement " + SpongeImplAdapter.class.getCanonicalName());
|
||||
}
|
||||
} catch (ClassNotFoundException e) {
|
||||
log.warn("Failed to load the Sponge adapter class '" + className +
|
||||
LOGGER.warn("Failed to load the Sponge adapter class '" + className +
|
||||
"' that is not supposed to be missing", e);
|
||||
} catch (IllegalAccessException e) {
|
||||
log.warn("Failed to load the Sponge adapter class '" + className +
|
||||
LOGGER.warn("Failed to load the Sponge adapter class '" + className +
|
||||
"' that is not supposed to be raising this error", e);
|
||||
} catch (Throwable e) {
|
||||
if (className.equals(customCandidate)) {
|
||||
log.warn("Failed to load the Sponge adapter class '" + className + "'", e);
|
||||
LOGGER.warn("Failed to load the Sponge adapter class '" + className + "'", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ import ninja.leaping.configurate.ConfigurationOptions;
|
||||
import ninja.leaping.configurate.commented.CommentedConfigurationNode;
|
||||
import ninja.leaping.configurate.loader.ConfigurationLoader;
|
||||
import ninja.leaping.configurate.objectmapping.ObjectMappingException;
|
||||
import org.slf4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
|
@ -23,7 +23,7 @@ import com.google.inject.Inject;
|
||||
import com.sk89q.worldedit.sponge.SpongeWorldEdit;
|
||||
import ninja.leaping.configurate.commented.CommentedConfigurationNode;
|
||||
import ninja.leaping.configurate.loader.ConfigurationLoader;
|
||||
import org.slf4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.spongepowered.api.config.DefaultConfig;
|
||||
|
||||
import java.io.File;
|
||||
|
Reference in New Issue
Block a user