mirror of
https://github.com/HibiscusMC/HMCCosmetics.git
synced 2025-12-30 04:19:28 +00:00
fix: check valid balloon entity before teleport
This commit is contained in:
@@ -45,6 +45,11 @@ public class CosmeticBalloonType extends Cosmetic {
|
||||
if (player == null || userBalloonManager == null) return;
|
||||
if (user.isInWardrobe()) return;
|
||||
|
||||
if (!userBalloonManager.getModelEntity().isValid()) {
|
||||
user.respawnBalloon();
|
||||
return;
|
||||
}
|
||||
|
||||
Location newLocation = player.getLocation();
|
||||
Location currentLocation = user.getBalloonManager().getLocation();
|
||||
newLocation = newLocation.clone().add(Settings.getBalloonOffset());
|
||||
|
||||
Reference in New Issue
Block a user