Remove .%s from classname for modern NMS
This commit is contained in:
parent
f023628927
commit
debb421e38
1 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue