Help fix error

This commit is contained in:
libraryaddict 2020-09-26 02:20:28 +12:00
parent 6d559b1887
commit 0a3bda1a8e

View File

@ -140,15 +140,19 @@ public class PlayerSkinHandler implements Listener {
return;
}
ArrayList<PlayerDisguise> removed = new ArrayList<>();
skins.removeIf(skin -> {
if (!skin.canRemove()) {
return false;
}
doPacketRemoval(player, skin.getDisguise().get());
removed.add(skin.getDisguise().get());
return true;
});
removed.forEach(disguise -> doPacketRemoval(player, disguise));
if (!skins.isEmpty()) {
return;
}