Fix error for disguise parser and string

This commit is contained in:
libraryaddict 2024-09-05 10:50:27 +12:00
parent 3162f3b35e
commit 01af19b5aa

View File

@ -406,7 +406,13 @@ public class DisguiseParser {
String valueString;
if (ourValue != null) {
ParamInfo paramInfo = ParamInfoManager.getParamInfo(method.getReturnType());
ParamInfo paramInfo;
if (ourValue instanceof String) {
paramInfo = ParamInfoManager.getParamInfo(String.class);
} else {
paramInfo = ParamInfoManager.getParamInfo(method.getReturnType());
}
if (paramInfo == null) {
LibsDisguises.getInstance().getLogger()
@ -530,7 +536,13 @@ public class DisguiseParser {
String valueString;
if (ourValue != null) {
ParamInfo paramInfo = ParamInfoManager.getParamInfo(getter.getReturnType());
ParamInfo paramInfo;
if (ourValue instanceof String) {
paramInfo = ParamInfoManager.getParamInfo(String.class);
} else {
paramInfo = ParamInfoManager.getParamInfo(getter.getReturnType());
}
if (paramInfo == null) {
LibsDisguises.getInstance().getLogger()