Fix #638 for real

This commit is contained in:
libraryaddict 2022-02-18 00:29:21 +13:00
parent 0ce85946a0
commit 8644aaacd1

View file

@ -90,6 +90,10 @@ public class DisguiseParser {
continue; continue;
} else if (setMethod.getName().equals("setTarget") && setMethod.getParam() != int.class) { } else if (setMethod.getName().equals("setTarget") && setMethod.getParam() != int.class) {
continue; continue;
} else if ((setMethod.getName().equals("setCustomName") || setMethod.getName().equals("setCustomNameVisible")) &&
disguise.isPlayerDisguise()) {
// Player Disguise overrides the behavior of custom name, so we definitely don't want it judged on a global scale
continue;
} else if (setMethod.getName().equals("setItemInMainHand") && setMethod.getParam() == Material.class) { } else if (setMethod.getName().equals("setItemInMainHand") && setMethod.getParam() == Material.class) {
continue; continue;
} else if (setMethod.getName().matches("setArmor") && setMethod.getParam() == ItemStack[].class) { } else if (setMethod.getName().matches("setArmor") && setMethod.getParam() == ItemStack[].class) {