Skip to content

Commit

Permalink
Fix #60
Browse files Browse the repository at this point in the history
  • Loading branch information
senseiwells committed Sep 16, 2024
1 parent 11e1dcf commit 1b7a06d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1b7a06d

Please sign in to comment.