From 26770ec83542caeed97f20c7e9d75276c8046630 Mon Sep 17 00:00:00 2001 From: quantiom Date: Fri, 30 Sep 2022 13:47:58 -0400 Subject: [PATCH] Fix issues with Redis --- pom.xml | 4 ---- .../advancedvanish/util/DependencyManager.java | 16 +++++++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 5538438..2102dfb 100644 --- a/pom.xml +++ b/pom.xml @@ -341,10 +341,6 @@ net.kyori.adventure me.quantiom.advancedvanish.shaded.adventure - - redis.clients - me.quantiom.advancedvanish.shaded.redis - net.byteflux.libby me.quantiom.advancedvanish.shaded.libby diff --git a/src/main/kotlin/me/quantiom/advancedvanish/util/DependencyManager.java b/src/main/kotlin/me/quantiom/advancedvanish/util/DependencyManager.java index e23f421..ea38e90 100644 --- a/src/main/kotlin/me/quantiom/advancedvanish/util/DependencyManager.java +++ b/src/main/kotlin/me/quantiom/advancedvanish/util/DependencyManager.java @@ -19,12 +19,16 @@ public DependencyManager(AdvancedVanishPlugin plugin) { } private Library getLibrary(String groupId, String artifactId, String version, String pattern, String relocatePattern) { - return Library.builder() + Library.Builder builder = Library.builder() .groupId(groupId) .artifactId(artifactId) - .version(version) - .relocate(pattern, relocatePattern) - .build(); + .version(version); + + if (!relocatePattern.isEmpty()) { + builder.relocate(pattern, relocatePattern); + } + + return builder.build(); } public void loadDependencies() { @@ -41,7 +45,9 @@ public void loadDependencies() { this.getLibrary("org{}jetbrains{}exposed", "exposed-dao", "0.39.2", "org{}jetbrains{}exposed", "me{}quantiom{}advancedvanish{}shaded{}exposed"), this.getLibrary("org{}jetbrains{}exposed", "exposed-jdbc", "0.39.2", "org{}jetbrains{}exposed", "me{}quantiom{}advancedvanish{}shaded{}exposed"), // redis - this.getLibrary("redis{}clients", "jedis", "4.2.0", "redis{}clients", "me{}quantiom{}advancedvanish{}shaded{}redis"), + this.getLibrary("redis{}clients", "jedis", "4.2.0", "", ""), + this.getLibrary("org{}apache{}commons", "commons-pool2", "2.11.1", "", ""), + this.getLibrary("org{}json", "json", "20211205", "", ""), // adventure this.getLibrary("net{}kyori", "adventure-api", "4.11.0", "net{}kyori{}adventure", "me{}quantiom{}advancedvanish{}shaded{}adventure"), this.getLibrary("net{}kyori", "adventure-platform-api", "4.1.2", "net{}kyori{}adventure", "me{}quantiom{}advancedvanish{}shaded{}adventure"),