Remove .%s from classname for modern NMS

This commit is contained in:
Roman Zhuravlev 2025-09-03 20:01:20 +05:00
parent f023628927
commit debb421e38

View file

@ -13,7 +13,11 @@ public class MinecraftReflection extends Reflection {
}
public static String getClassName(String className) {
return className.contains("%s") ? String.format(className, MinecraftReflectionVersion.NMS) : className;
if (className.contains("%s")) {
return MinecraftReflectionVersion.NMS.isEmpty() ?
className.replace(".%s", "") : String.format(className, MinecraftReflectionVersion.NMS);
}
return className;
}
public static MinecraftReflection of(String className) {