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

Added skin overlay on wardrobe

This commit is contained in:
Fisher2911
2022-02-16 23:51:01 -05:00
parent f58d328bae
commit 832980f593
12 changed files with 84 additions and 3 deletions

View File

@@ -191,6 +191,12 @@ public class PacketManager {
return playerPackets.getPlayerInfoPacket(player, uuid);
}
public static PacketContainer getPlayerOverlayPacket(final int playerId) throws IllegalStateException {
if (playerPackets == null)
throw new IllegalStateException("This cannot be used in version: " + Bukkit.getVersion());
return playerPackets.getOverlayPacket(playerId);
}
public static PacketContainer getRemovePlayerPacket(final Player player, final UUID uuid, final int entityId) {
if (playerPackets == null)
throw new IllegalStateException("This cannot be used in version: " + Bukkit.getVersion());

View File

@@ -105,8 +105,13 @@ public class Wardrobe extends User {
PacketManager.sendPacket(viewer, playerInfoPacket, playerSpawnPacket);
this.spawnArmorStand(viewer, this.currentLocation, this.plugin.getSettings().getCosmeticSettings());
this.updateArmorStand(viewer, plugin.getSettings(), this.currentLocation);
PacketManager.sendPacket(viewer, PacketManager.getLookPacket(this.getEntityId(), this.currentLocation));
PacketManager.sendPacket(viewer, PacketManager.getRotationPacket(this.getEntityId(), this.currentLocation));
PacketManager.sendPacket(
viewer,
PacketManager.getLookPacket(this.getEntityId(), this.currentLocation),
PacketManager.getRotationPacket(this.getEntityId(), this.currentLocation),
PacketManager.getPlayerOverlayPacket(this.getEntityId())
);
viewer.sendMessage("Sent overlay");
this.spawned = true;
this.startSpinTask(viewer);