From 77fa52701f9a53afc2f164ccf95c2c76edc07433 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 5 Mar 2021 16:01:35 +1300 Subject: [PATCH] Dont send meta if disguise still not active --- .../disguise/utilities/listeners/PlayerSkinHandler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/listeners/PlayerSkinHandler.java b/src/main/java/me/libraryaddict/disguise/utilities/listeners/PlayerSkinHandler.java index 9ca18a81..6a70fd37 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/listeners/PlayerSkinHandler.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/listeners/PlayerSkinHandler.java @@ -253,6 +253,11 @@ public class PlayerSkinHandler implements Listener { private void addMetadata(Player player, PlayerSkin skin) throws InvocationTargetException { PlayerDisguise disguise = skin.getDisguise().get(); + + if (!disguise.isDisguiseInUse()) { + return; + } + Entity entity = disguise.getEntity(); WrappedDataWatcher watcher = DisguiseUtilities.createSanitizedDataWatcher(player, WrappedDataWatcher.getEntityWatcher(entity), disguise.getWatcher());