From 8644aaacd1b5de52c0be7578518e5b1f43194e8a Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 18 Feb 2022 00:29:21 +1300 Subject: [PATCH] Fix #638 for real --- .../disguise/utilities/parser/DisguiseParser.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java b/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java index 2f027636..9ae13e33 100644 --- a/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java +++ b/plugin/src/main/java/me/libraryaddict/disguise/utilities/parser/DisguiseParser.java @@ -90,6 +90,10 @@ public class DisguiseParser { continue; } else if (setMethod.getName().equals("setTarget") && setMethod.getParam() != int.class) { 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) { continue; } else if (setMethod.getName().matches("setArmor") && setMethod.getParam() == ItemStack[].class) {