9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2026-01-06 15:51:50 +00:00

fix: Leads not properly disappearing teleporting into WG region with hidden cosmetics

This commit is contained in:
LoJoSho
2023-07-08 11:40:08 -05:00
parent d2962ba5ed
commit f2b0fb29d3
9 changed files with 19 additions and 44 deletions

View File

@@ -365,6 +365,7 @@ public class CosmeticUser {
public void spawnBalloon(CosmeticBalloonType cosmeticBalloonType) {
if (this.userBalloonManager != null) return;
this.userBalloonManager = NMSHandlers.getHandler().spawnBalloon(this, cosmeticBalloonType);
updateCosmetic(cosmeticBalloonType);
}
public void despawnBalloon() {

View File

@@ -20,7 +20,7 @@ public class UserBalloonPufferfish {
public UserBalloonPufferfish(int id, UUID uuid) {
this.id = id;
this.uuid = uuid;
this.lastUpdate = System.currentTimeMillis();
this.lastUpdate = 0L;
}
public int getId() {
@@ -55,4 +55,9 @@ public class UserBalloonPufferfish {
lastUpdate = System.currentTimeMillis();
return newPlayers;
}
public void hidePufferfish() {
PacketManager.sendEntityDestroyPacket(id, viewers);
viewers.clear();
}
}