Refactored bukkit nms package

This commit is contained in:
OakLoaf
2025-09-30 19:00:36 +01:00
parent b88712e569
commit 4b218a65f6
26 changed files with 39 additions and 44 deletions

View File

@@ -46,12 +46,7 @@ public interface Initializer {
private static PlatformImpl constructPlatform(TerraBukkitPlugin plugin) {
try {
String packageVersion = NMS;
if (NMS.equals("v1_21_5") || NMS.equals("v1_21_6") || NMS.equals("v1_21_7")) {
packageVersion = "v1_21_8";
}
Class<?> platformClass = Class.forName(TERRA_PACKAGE + "." + packageVersion + ".NMSPlatform");
Class<?> platformClass = Class.forName(TERRA_PACKAGE + "." + NMS + ".NMSPlatform");
try {
return (PlatformImpl) platformClass
.getConstructor(TerraBukkitPlugin.class)