9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-30 04:19:28 +00:00

fix: Flying with elytra and teleporting with backpack causing NPE

This commit is contained in:
LoJoSho
2023-03-01 10:14:05 -06:00
parent 1f714c0153
commit df8ad26684

View File

@@ -101,7 +101,7 @@ public class PlayerGameListener implements Listener {
return;
}
if (user.hasCosmeticInSlot(CosmeticSlot.BACKPACK)) {
if (user.hasCosmeticInSlot(CosmeticSlot.BACKPACK) && user.getUserBackpackManager() != null) {
user.getUserBackpackManager().hideBackpack();
user.getUserBackpackManager().getArmorStand().teleport(event.getTo());