diff --git a/main/pom.xml b/main/pom.xml
index e94f85b01..b7c64a878 100644
--- a/main/pom.xml
+++ b/main/pom.xml
@@ -44,7 +44,7 @@
AlessioDP
https://repo.alessiodp.com/releases/
-
+
@@ -102,12 +102,7 @@
worldguard-bukkit
${worldguard.version}
provided
-
-
- net.byteflux
- libby-bukkit
- 1.1.5
-
+
net.kyori
adventure-text-minimessage
@@ -200,6 +195,7 @@
+
diff --git a/main/src/main/java/net/citizensnpcs/Citizens.java b/main/src/main/java/net/citizensnpcs/Citizens.java
index 45a65c3ba..9edc4bb35 100644
--- a/main/src/main/java/net/citizensnpcs/Citizens.java
+++ b/main/src/main/java/net/citizensnpcs/Citizens.java
@@ -29,10 +29,6 @@ import com.google.common.collect.Maps;
import com.mojang.authlib.GameProfile;
import ch.ethz.globis.phtree.PhTreeHelper;
-import net.byteflux.libby.BukkitLibraryManager;
-import net.byteflux.libby.Library;
-import net.byteflux.libby.LibraryManager;
-import net.byteflux.libby.logging.LogLevel;
import net.citizensnpcs.Settings.Setting;
import net.citizensnpcs.api.CitizensAPI;
import net.citizensnpcs.api.CitizensPlugin;
@@ -280,54 +276,6 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
return traitFactory;
}
- private void loadMavenLibraries() {
- getLogger().info("Loading external libraries");
-
- LibraryManager lib = new BukkitLibraryManager(this);
- lib.addMavenCentral();
- lib.setLogLevel(LogLevel.WARN);
- // Unfortunately, transitive dependency management is not supported in this library.
- lib.loadLibrary(
- Library.builder().groupId("ch{}ethz{}globis{}phtree").artifactId("phtree").version("2.8.0").build());
- lib.loadLibrary(Library.builder().groupId("it{}unimi{}dsi").artifactId("fastutil").version("8.5.14")
- .relocate("it{}unimi{}dsi", "clib{}fastutil").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-minimessage")
- .version("4.17.0").relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-api").version("4.17.0")
- .relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-key").version("4.17.0")
- .relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("examination-api").version("1.3.0")
- .relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("examination-string").version("1.3.0")
- .relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-bukkit").version("4.3.3")
- .relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-api").version("4.3.3")
- .relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-bungeecord")
- .version("4.3.3").relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-legacy")
- .version("4.13.1").relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-nbt").version("4.13.1")
- .relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-gson")
- .version("4.13.1").relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-text-serializer-gson-legacy-impl")
- .version("4.13.1").relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-facet").version("4.3.3")
- .relocate("net{}kyori", "clib{}net{}kyori").build());
- lib.loadLibrary(Library.builder().groupId("net{}kyori").artifactId("adventure-platform-viaversion")
- .version("4.3.3").relocate("net{}kyori", "clib{}net{}kyori").build());
- try {
- Class.forName("org.joml.Vector3f");
- } catch (Throwable t) {
- lib.loadLibrary(Library.builder().groupId("org{}joml").artifactId("joml").version("1.10.5").build());
- }
- PhTreeHelper.enablePooling(false);
- PhTreeHelper.MAX_OBJECT_POOL_SIZE = 0;
- }
-
@Override
public boolean onCommand(CommandSender sender, org.bukkit.command.Command command, String cmdName, String[] args) {
Object[] methodArgs = { sender, selector == null ? null : selector.getSelected(sender) };
@@ -364,7 +312,8 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
@Override
public void onEnable() {
- loadMavenLibraries();
+ PhTreeHelper.enablePooling(false);
+ PhTreeHelper.MAX_OBJECT_POOL_SIZE = 0;
CitizensAPI.setImplementation(this);
config = new Settings(getDataFolder());
diff --git a/main/src/main/resources/plugin.yml b/main/src/main/resources/plugin.yml
index 9d5775b09..6976b5c64 100644
--- a/main/src/main/resources/plugin.yml
+++ b/main/src/main/resources/plugin.yml
@@ -5,6 +5,11 @@ version: ${project.version} (build ${BUILD_NUMBER})
main: net.citizensnpcs.Citizens
website: https://www.citizensnpcs.co
api-version: "1.13"
+libraries:
+ - ch.ethz.globis.phtree:phtree:2.8.0
+ - org.joml:joml:1.10.5
+ - net.kyori:adventure-platform-bukkit:4.3.3
+ - net.kyori:adventure-text-minimessage:4.17.0
commands:
trait:
description: Trait commands