Refractor bukkit to v1_21_3

This commit is contained in:
Zoe Gidiere
2024-10-29 15:49:45 -06:00
parent 1929239015
commit 710bbc33c9
27 changed files with 28 additions and 36 deletions

View File

@@ -194,7 +194,7 @@ public class TerraBukkitPlugin extends JavaPlugin {
@Override
public @Nullable
ChunkGenerator getDefaultWorldGenerator(@NotNull String worldName, String id) {
if(id == null || id.trim().equals("")) { return null; }
if(id == null || id.trim().isEmpty()) { return null; }
return new BukkitChunkGeneratorWrapper(generatorMap.computeIfAbsent(worldName, name -> {
ConfigPack pack = platform.getConfigRegistry().getByID(id).orElseThrow(
() -> new IllegalArgumentException("No such config pack \"" + id + "\""));

View File

@@ -54,9 +54,6 @@ public interface Initializer {
private static Initializer constructInitializer() {
try {
String packageVersion = NMS;
if(NMS.equals("v1_21_3")) {
packageVersion = "v1_21"; // TODO: Refactor nms package to v1_21_3
}
Class<?> initializerClass = Class.forName(TERRA_PACKAGE + "." + packageVersion + ".NMSInitializer");
try {