diff --git a/build.gradle b/build.gradle index 2f217ae..4f5428c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ allprojects { group 'com.azuriom' - version '1.3.5' + version '1.3.6' } subprojects { diff --git a/bukkit/build.gradle b/bukkit/build.gradle index dc13854..e2ecece 100644 --- a/bukkit/build.gradle +++ b/bukkit/build.gradle @@ -15,8 +15,10 @@ dependencies { compileOnly 'me.clip:placeholderapi:2.11.1' } -// Folia is compiled with Java 17 -disableAutoTargetJvm() +java { + // Folia is compiled with Java 17 + disableAutoTargetJvm() +} processResources { filesMatching('*.yml') { diff --git a/bukkit/src/main/java/com/azuriom/azlink/bukkit/AzLinkBukkitPlugin.java b/bukkit/src/main/java/com/azuriom/azlink/bukkit/AzLinkBukkitPlugin.java index 1c4e429..ac0241f 100644 --- a/bukkit/src/main/java/com/azuriom/azlink/bukkit/AzLinkBukkitPlugin.java +++ b/bukkit/src/main/java/com/azuriom/azlink/bukkit/AzLinkBukkitPlugin.java @@ -48,7 +48,7 @@ public void onEnable() { Class.forName("com.google.gson.JsonObject"); Class.forName("io.netty.channel.Channel"); } catch (ClassNotFoundException e) { - this.logger.error("Your server version is not compatible with this version of AzLink !"); + this.logger.error("Your server version is not compatible with this version of AzLink."); this.logger.error("Please download AzLink Legacy on https://azuriom.com/azlink"); getServer().getPluginManager().disablePlugin(this); return; @@ -73,14 +73,15 @@ protected HttpServer createHttpServer() { return super.createHttpServer(); } }; + + saveDefaultConfig(); + this.plugin.init(); getCommand("azlink").setExecutor(new BukkitCommandExecutor(this.plugin)); scheduleTpsTask(); - saveDefaultConfig(); - if (getConfig().getBoolean("authme-integration") && getServer().getPluginManager().getPlugin("AuthMe") != null) { getServer().getPluginManager().registerEvents(new AuthMeIntegration(this), this); diff --git a/bukkit/src/main/java/com/azuriom/azlink/bukkit/injector/InjectedHttpServer.java b/bukkit/src/main/java/com/azuriom/azlink/bukkit/injector/InjectedHttpServer.java index 96ef8fb..70bf34e 100644 --- a/bukkit/src/main/java/com/azuriom/azlink/bukkit/injector/InjectedHttpServer.java +++ b/bukkit/src/main/java/com/azuriom/azlink/bukkit/injector/InjectedHttpServer.java @@ -37,7 +37,7 @@ public void start() { } if (!Bukkit.getServer().getClass().getSimpleName().equals("CraftServer")) { - plugin.getLoggerAdapter().error("Injecting HTTP server on server channel is only supported on CraftBukkit based servers. You can use an other port for AzLink"); + plugin.getLoggerAdapter().error("Injecting HTTP server on server channel is only supported on CraftBukkit based servers. You can use an other port for AzLink."); return; } @@ -122,7 +122,9 @@ private Method getServerConnectionMethod(Object minecraftServer) throws NoSuchMe return serverClass.getMethod("getServerConnection"); } catch (NoSuchMethodException e) { for (Method method : serverClass.getMethods()) { - if (method.getReturnType().getSimpleName().equals("ServerConnection")) { + String type = method.getReturnType().getSimpleName(); + + if (type.equals("ServerConnection") || type.equals("ServerConnectionListener")) { return method; } } diff --git a/universal-legacy/build.gradle b/universal-legacy/build.gradle index 10edb6c..5092f21 100644 --- a/universal-legacy/build.gradle +++ b/universal-legacy/build.gradle @@ -21,6 +21,10 @@ shadowJar { relocate 'com.google.gson', 'com.azuriom.azlink.libs.gson' relocate 'io.netty', 'com.azuriom.azlink.libs.netty' + + manifest { + attributes 'Paperweight-Mappings-Namespace': 'mojang' + } } artifacts { diff --git a/universal/build.gradle b/universal/build.gradle index b79d924..015aaaa 100644 --- a/universal/build.gradle +++ b/universal/build.gradle @@ -14,6 +14,10 @@ dependencies { shadowJar { archiveFileName = "AzLink-${project.version}.jar" + + manifest { + attributes 'Paperweight-Mappings-Namespace': 'mojang' + } } artifacts { diff --git a/velocity/build.gradle b/velocity/build.gradle index e10a25f..392a700 100644 --- a/velocity/build.gradle +++ b/velocity/build.gradle @@ -17,8 +17,10 @@ dependencies { annotationProcessor 'com.velocitypowered:velocity-api:3.1.1' } -// LimboAuth support -disableAutoTargetJvm() +java { + // LimboAuth support + disableAutoTargetJvm() +} blossom { replaceToken '${pluginVersion}', project.version, 'src/main/java/com/azuriom/azlink/velocity/AzLinkVelocityPlugin.java'