diff --git a/src/main/kotlin/me/senseiwells/replay/chunk/ChunkGamePacketPacketListener.kt b/src/main/kotlin/me/senseiwells/replay/chunk/ChunkGamePacketPacketListener.kt index fa17c5a..17a9f69 100644 --- a/src/main/kotlin/me/senseiwells/replay/chunk/ChunkGamePacketPacketListener.kt +++ b/src/main/kotlin/me/senseiwells/replay/chunk/ChunkGamePacketPacketListener.kt @@ -1,11 +1,8 @@ package me.senseiwells.replay.chunk import me.senseiwells.replay.rejoin.RejoinConnection -import net.minecraft.network.Connection import net.minecraft.network.PacketSendListener import net.minecraft.network.protocol.Packet -import net.minecraft.server.MinecraftServer -import net.minecraft.server.level.ServerPlayer import net.minecraft.server.network.CommonListenerCookie import net.minecraft.server.network.ServerGamePacketListenerImpl diff --git a/src/main/kotlin/me/senseiwells/replay/player/PlayerRecorder.kt b/src/main/kotlin/me/senseiwells/replay/player/PlayerRecorder.kt index f89eca6..635fe13 100644 --- a/src/main/kotlin/me/senseiwells/replay/player/PlayerRecorder.kt +++ b/src/main/kotlin/me/senseiwells/replay/player/PlayerRecorder.kt @@ -47,7 +47,7 @@ class PlayerRecorder internal constructor( * The level that the player is currently in. */ override val level: ServerLevel - get() = this.getPlayerOrThrow().serverLevel() + get() = this.player?.serverLevel() ?: this.server.overworld() /** * The current position of the player.