Search SL4J JDK provider in our own classpath

Using the previous behavior it would look for the service file and provider
in the server jar. First it requires relocating the service file to our JDK
provider and let the service only be queryable from our plugin jar.

Fixes #668

Search SL4J JDK provider in our own classpath

Using the previous behavior it would look for the service file and provider
in the server jar. First it requires relocating the service file to our JDK
provider and let the service only be queryable from our plugin jar.

Fixes #668
This commit is contained in:
games647 committed 2021-12-02 14:40:26 +01:00
1 parent 829ba79400
commit e1c1da199e
6 files changed
+55 -23

No files matched your search

+7 -3
View File
@@ -77,6 +77,11 @@
<shadedPattern>fastlogin.paperlib</shadedPattern>
</relocation>
</relocations>
<!-- Rename the service file too to let SLF4J api find our own relocated jdk logger -->
<!-- Located in META-INF/services -->
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
<executions>
<execution>
@@ -147,9 +152,9 @@
<!-- PaperSpigot API for correcting usercache usage -->
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.15.2-R0.1-SNAPSHOT</version>
<version>1.18-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
@@ -158,7 +163,6 @@
<groupId>io.papermc</groupId>
<artifactId>paperlib</artifactId>
<version>1.0.7</version>
<scope>compile</scope>
</dependency>
<!--Library for listening and sending Minecraft packets-->
@@ -79,7 +79,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
private PremiumPlaceholder premiumPlaceholder;
public FastLoginBukkit() {
this.logger = CommonUtil.createLoggerFromJDK(getLogger());
this.logger = CommonUtil.initializeLoggerService(getLogger());
this.scheduler = new BukkitScheduler(this, logger, getThreadFactory());
}
@@ -101,7 +101,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
bungeeManager = new BungeeManager(this);
bungeeManager.initialize();
PluginManager pluginManager = getServer().getPluginManager();
if (bungeeManager.isEnabled()) {
markInitialized();
@@ -153,7 +153,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
if (getServer().getPluginManager().getPlugin("Geyser-Spigot") != null) {
geyserService = new GeyserService(GeyserConnector.getInstance(), core);
}
if (getServer().getPluginManager().getPlugin("floodgate") != null) {
floodgateService = new FloodgateService(FloodgateApi.getInstance(), core);
@@ -272,7 +272,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
public void sendMessage(CommandSender receiver, String message) {
receiver.sendMessage(message);
}
/**
* Checks if a plugin is installed on the server
* @param name the name of the plugin
@@ -301,7 +301,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
}
/**
* Send warning messages to log if incompatible plugins are used
* Send warning messages to log if incompatible plugins are used
*/
private void dependencyWarnings() {
if (isPluginInstalled("floodgate-bukkit")) {