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

fix: backpacks not reattaching after teleporting

This commit is contained in:
LoJoSho
2024-03-05 22:26:10 -06:00
parent a203c60df1
commit 068ed3eb70

View File

@@ -135,7 +135,7 @@ public class PlayerGameListener implements Listener {
if (Settings.getDisabledWorlds().contains(user.getEntity().getLocation().getWorld().getName())) {
user.hideCosmetics(CosmeticUser.HiddenReason.WORLD);
} else {
user.showCosmetics(CosmeticUser.HiddenReason.WORLD);
user.showCosmetics(CosmeticUser.HiddenReason.WORLD);
}
if (user.hasCosmeticInSlot(CosmeticSlot.BACKPACK) && user.getUserBackpackManager() != null) {
user.respawnBackpack();
@@ -144,7 +144,7 @@ public class PlayerGameListener implements Listener {
user.respawnBalloon();
}
user.updateCosmetic();
}, 1);
}, 2);
if (event.getCause().equals(PlayerTeleportEvent.TeleportCause.NETHER_PORTAL) || event.getCause().equals(PlayerTeleportEvent.TeleportCause.END_PORTAL)) return;
if (user.getUserEmoteManager().isPlayingEmote()) {