fix: Relocate and Download com.typesafe.config

Velocity 3.0.x+ and Paper 1.19+ include this dependency, but earlier versions of Paper do not

fixes #52
This commit is contained in:
4drian3d 2022-08-16 21:24:08 +00:00
parent f1db0018f2
commit 34d3f7248f
3 changed files with 11 additions and 2 deletions

View File

@ -18,6 +18,8 @@ public final class LibsManager {
= new Relocation("org{}spongepowered", "me.adrianed.authmevelocity.libs.sponge"); = new Relocation("org{}spongepowered", "me.adrianed.authmevelocity.libs.sponge");
final Relocation geantyrefRelocation = final Relocation geantyrefRelocation =
new Relocation("io{}leangen{}geantyref", "me.adrianed.authmevelocity.libs.geantyref"); new Relocation("io{}leangen{}geantyref", "me.adrianed.authmevelocity.libs.geantyref");
final Relocation typesafeRelocation
= new Relocation("com{}typesafe", "me.adrianed.authmevelocity.libs.config");
final Library hocon = Library.builder() final Library hocon = Library.builder()
.groupId("org{}spongepowered") .groupId("org{}spongepowered")
.artifactId("configurate-hocon") .artifactId("configurate-hocon")
@ -25,6 +27,7 @@ public final class LibsManager {
.id("configurate-hocon") .id("configurate-hocon")
.relocate(configurateRelocation) .relocate(configurateRelocation)
.relocate(geantyrefRelocation) .relocate(geantyrefRelocation)
.relocate(typesafeRelocation)
.build(); .build();
final Library confCore = Library.builder() final Library confCore = Library.builder()
.groupId("org{}spongepowered") .groupId("org{}spongepowered")
@ -41,7 +44,14 @@ public final class LibsManager {
.id("geantyref") .id("geantyref")
.relocate(geantyrefRelocation) .relocate(geantyrefRelocation)
.build(); .build();
final Library typesafe = Library.builder()
.groupId("com{}typesafe")
.artifactId("config")
.version("1.4.2")
.relocate(typesafeRelocation)
.build();
manager.loadLibrary(typesafe);
manager.loadLibrary(confCore); manager.loadLibrary(confCore);
manager.loadLibrary(hocon); manager.loadLibrary(hocon);
manager.loadLibrary(geantyref); manager.loadLibrary(geantyref);

View File

@ -9,7 +9,6 @@ import org.spongepowered.configurate.CommentedConfigurationNode;
import org.spongepowered.configurate.ConfigurateException; import org.spongepowered.configurate.ConfigurateException;
import org.spongepowered.configurate.hocon.HoconConfigurationLoader; import org.spongepowered.configurate.hocon.HoconConfigurationLoader;
public final class Loader { public final class Loader {
private Loader() {} private Loader() {}
public static <C> ConfigurationContainer<C> loadMainConfig(Path path, Class<C> clazz, Logger logger) { public static <C> ConfigurationContainer<C> loadMainConfig(Path path, Class<C> clazz, Logger logger) {

View File

@ -1,5 +1,5 @@
group = me.adrianed.authmevelocity group = me.adrianed.authmevelocity
version = 3.0.0 version = 3.0.1
description = AuthMeReloaded Support for Velocity description = AuthMeReloaded Support for Velocity
url = https://github.com/4drian3d/AuthMeVelocity url = https://github.com/4drian3d/AuthMeVelocity
id = authmevelocity id = authmevelocity