Fix compile errors

This commit is contained in:
zontreck 2024-04-07 16:01:28 -07:00
parent d86dace503
commit ed9d9bd249
4 changed files with 15 additions and 7 deletions

View file

@ -7,6 +7,7 @@ import dev.zontreck.libzontreck.exceptions.InvalidDeserialization;
import dev.zontreck.libzontreck.vectors.WorldPosition;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ServerPlayer;
import net.minecraftforge.server.ServerLifecycleHooks;
public class PlayerComponent
{
@ -34,7 +35,7 @@ public class PlayerComponent
public static PlayerComponent fromID(UUID ID)
{
return new PlayerComponent(LibZontreck.THE_SERVER.getPlayerList().getPlayer(ID));
return new PlayerComponent(ServerLifecycleHooks.getCurrentServer().getPlayerList().getPlayer(ID));
}
public CompoundTag serialize()

View file

@ -5,6 +5,7 @@ import java.util.UUID;
import dev.zontreck.libzontreck.LibZontreck;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.server.level.ServerPlayer;
import net.minecraftforge.server.ServerLifecycleHooks;
public class PlayerContainer {
public UUID ID;
@ -13,7 +14,7 @@ public class PlayerContainer {
public PlayerContainer(UUID ID)
{
this(LibZontreck.THE_SERVER.getPlayerList().getPlayer(ID));
this(ServerLifecycleHooks.getCurrentServer().getPlayerList().getPlayer(ID));
}
public PlayerContainer(ServerPlayer player)
{