Fix error in packet handler

This commit is contained in:
Mrbysco 2024-03-05 17:29:16 +01:00
parent abbc1ae90c
commit 06de7536df

View file

@ -141,7 +141,7 @@ public final class PacketHandler {
@OnlyIn(Dist.CLIENT)
public void handleData(CompoundTag compound, PlayPayloadContext context) {
CompoundTag dataTag = compound.getCompound("Data");
Player player = context.player().get(); //ActuallyAdditions.PROXY.getCurrentPlayer();
Player player = context.player().orElse(null); //ActuallyAdditions.PROXY.getCurrentPlayer();
if (player != null) {
PlayerData.getDataFromPlayer(player).readFromNBT(dataTag, false);