Fix legacy advancement nms split including CraftServer class name

This commit is contained in:
Vankka 2024-12-05 17:47:16 +02:00
parent 4768bef1a1
commit 3906be9c2f
No known key found for this signature in database
GPG Key ID: 62E48025ED4E7EBB

View File

@ -46,7 +46,7 @@ public class BukkitLegacyAdvancementListener extends AbstractBukkitAwardListener
NMS nms = null;
try {
String nmsVersion = server.getClass().getName().split("\\.", 4)[3];
String nmsVersion = server.getClass().getName().split("\\.")[3];
if ((version.startsWith("1.19") && !version.matches("1.19.[1-3].*"))
|| version.startsWith("1.2")) {
// 1.19.4+