From fe07351a55d240f9a71660e5ea089db626def107 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 27 Oct 2023 11:59:29 -0500 Subject: [PATCH] fix: Fixed Paper 1.20.2 Support --- core/build.gradle.kts | 5 +++++ gradle.properties | 2 +- paper/build.gradle.kts | 6 ++++++ .../main/java/me/xneox/epicguard/paper/LibraryLoader.java | 3 +-- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/core/build.gradle.kts b/core/build.gradle.kts index a91a9c47..fbb6f097 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -27,8 +27,13 @@ tasks { javadoc { options { this.outputLevel = JavadocOutputLevel.QUIET + encoding = Charsets.UTF_8.name() } } + compileJava { + options.encoding = Charsets.UTF_8.name() + options.release.set(17) + } } java { diff --git a/gradle.properties b/gradle.properties index 2a470a27..63ddd90e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group = io.github.4drian3d -version = 7.5.0 +version = 7.5.1-SNAPSHOT description=Bot protection system for Minecraft servers. org.gradle.caching=true diff --git a/paper/build.gradle.kts b/paper/build.gradle.kts index 0c7ec500..2e7332f7 100644 --- a/paper/build.gradle.kts +++ b/paper/build.gradle.kts @@ -4,6 +4,7 @@ plugins { dependencies { implementation(projects.core) + implementation(libs.configurate) compileOnly(libs.paper) } @@ -19,4 +20,9 @@ tasks { expand("version" to project.version) } } + shadowJar { + relocate("org.spongepowered", "me.xneox.epicguard.libs.configurate") + relocate("com.typesafe", "me.xneox.epicguard.libs.typesafe") + relocate("io.leangen.geantyref", "me.xneox.epicguard.libs.geantyref") + } } diff --git a/paper/src/main/java/me/xneox/epicguard/paper/LibraryLoader.java b/paper/src/main/java/me/xneox/epicguard/paper/LibraryLoader.java index f90a3f12..b0bc1238 100644 --- a/paper/src/main/java/me/xneox/epicguard/paper/LibraryLoader.java +++ b/paper/src/main/java/me/xneox/epicguard/paper/LibraryLoader.java @@ -12,7 +12,7 @@ import java.util.stream.Stream; @SuppressWarnings({"unused", "UnstableApiUsage"}) -public class LibraryLoader implements PluginLoader { +public final class LibraryLoader implements PluginLoader { @Override public void classloader(@NotNull PluginClasspathBuilder classpathBuilder) { final MavenLibraryResolver resolver = new MavenLibraryResolver(); @@ -23,7 +23,6 @@ public void classloader(@NotNull PluginClasspathBuilder classpathBuilder) { resolver.addRepository(mavenCentral); Stream.of( - "org.spongepowered:configurate-hocon:" + VersionUtils.CONFIGURATE, "com.zaxxer:HikariCP:" + VersionUtils.HIKARI, "com.github.ben-manes.caffeine:caffeine:" + VersionUtils.CAFFEINE, "org.apache.commons:commons-compress:" + VersionUtils.COMMANDS_COMPRESS,