From 842841cd749c45ad9f5f2e62e3aab8dc2dce8e5c Mon Sep 17 00:00:00 2001 From: Christian Koop Date: Fri, 30 Dec 2022 20:09:01 +0100 Subject: [PATCH] Fixes NMS for Spigot 1.19.0 / 1.19.1 / 1.19.2 detection Purpur-Spigot and plain Spigot do not end with `.0`. Not sure if Paper does or Spigot 1.19.1 does? I just added the plain `1.19` check. This is not an issue in the Core v3 branch as the check is more stable there. --- Core/src/main/java/com/songoda/core/nms/NmsManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/main/java/com/songoda/core/nms/NmsManager.java b/Core/src/main/java/com/songoda/core/nms/NmsManager.java index 63568efe..24c4939e 100644 --- a/Core/src/main/java/com/songoda/core/nms/NmsManager.java +++ b/Core/src/main/java/com/songoda/core/nms/NmsManager.java @@ -129,7 +129,7 @@ public class NmsManager { world = new com.songoda.core.nms.v1_18_R2.world.WorldCoreImpl(); break; case "v1_19_R1": - if (bukkitVersion.endsWith(".0")) { + if (bukkitVersion.endsWith(".0") || bukkitVersion.equals("1.19")) { player = new com.songoda.core.nms.v1_19_R1.entity.NMSPlayerImpl(); anvil = new com.songoda.core.nms.v1_19_R1.anvil.AnvilCore(); nbt = new com.songoda.core.nms.v1_19_R1.nbt.NBTCoreImpl();