Skip to content

Commit

Permalink
fix(1_19_R2): Fix player re-add packet
Browse files Browse the repository at this point in the history
[SkinsRestorerX commit](SkinsRestorer/SkinsRestorer@e09e536)
  • Loading branch information
GeorgeV220 committed Dec 29, 2022
1 parent 9d0d0ae commit de0bc3a
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.georgev22.library.yaml.file.FileConfiguration;
import com.georgev22.skinoverlay.handler.SkinHandler;
import com.georgev22.skinoverlay.utilities.player.PlayerObject;
import com.google.common.collect.ImmutableList;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.minecraft.network.protocol.Packet;
Expand All @@ -22,6 +21,7 @@
import org.jetbrains.annotations.NotNull;

import java.util.HashSet;
import java.util.List;
import java.util.Objects;

public class SkinHandler_1_19_R2 extends SkinHandler {
Expand All @@ -38,9 +38,8 @@ public void updateSkin(@NotNull FileConfiguration fileConfiguration, @NotNull Pl
final ServerPlayer entityPlayer = craftPlayer.getHandle();


ClientboundPlayerInfoRemovePacket removePlayer = new ClientboundPlayerInfoRemovePacket(ImmutableList.of(entityPlayer.getUUID()));
ClientboundPlayerInfoUpdatePacket addPlayer = new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.ADD_PLAYER, entityPlayer);

ClientboundPlayerInfoRemovePacket removePlayer = new ClientboundPlayerInfoRemovePacket(List.of(entityPlayer.getUUID()));
ClientboundPlayerInfoUpdatePacket addPlayer = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityPlayer));
ServerLevel world = entityPlayer.getLevel();
ServerPlayerGameMode gamemode = entityPlayer.gameMode;

Expand Down

0 comments on commit de0bc3a

Please sign in to comment.