9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-29 03:49:19 +00:00

fix: no entity + backpack spawning causing NPE

This commit is contained in:
LoJoSho
2024-03-16 12:13:07 -05:00
parent 54e867ab0b
commit 383fdfa7f6

View File

@@ -39,7 +39,7 @@ public class UserBackpackManager {
this.backpackHidden = false;
this.invisibleArmorStand = ServerUtils.getNextEntityId();
this.entityManager = new UserEntity(user.getUniqueId());
this.entityManager.refreshViewers(user.getEntity().getLocation());
if (user.getEntity() != null) this.entityManager.refreshViewers(user.getEntity().getLocation()); // Fixes an issue where a player, who somehow removes their potions, but doesn't have an entity produces an NPE (it's dumb)
}
public int getFirstArmorStandId() {