Skip to content

Commit

Permalink
Prevent remapping on Paper 1.20.6/1.21
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMicky-FR committed Jul 29, 2024
1 parent 4704819 commit 5414bdf
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
allprojects {
group 'com.azuriom'
version '1.3.5'
version '1.3.6'
}

subprojects {
Expand Down
6 changes: 4 additions & 2 deletions bukkit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}
}
Expand Down
4 changes: 4 additions & 0 deletions universal-legacy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions universal/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ dependencies {

shadowJar {
archiveFileName = "AzLink-${project.version}.jar"

manifest {
attributes 'Paperweight-Mappings-Namespace': 'mojang'
}
}

artifacts {
Expand Down
6 changes: 4 additions & 2 deletions velocity/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 5414bdf

Please sign in to comment.