Dont send meta if disguise still not active

This commit is contained in:
libraryaddict 2021-03-05 16:01:35 +13:00
parent ce5b374da3
commit 77fa52701f

@ -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());