Skip to content

Commit ce362b7

Browse files
committed
Probably incorrect bed existing checking fixed.
Signed-off-by: Pavel Erokhin (MairwunNx) <[email protected]>
1 parent 17b3719 commit ce362b7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/com/mairwunnx/projectessentials/spawn/ModuleObject.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ class ModuleObject : IModule {
7676
}
7777

7878
@SubscribeEvent(priority = EventPriority.HIGHEST)
79-
fun onPlayerRespawn(event: PlayerEvent.PlayerRespawnEvent) {
80-
val player = event.player as ServerPlayerEntity
79+
fun onPlayerRespawn(event: PlayerEvent.Clone) {
80+
val player = event.original as ServerPlayerEntity
8181
if (player.bedPosition.isPresent) {
8282
player.server.worlds.forEach {
8383
val pos = player.getBedLocation(it.dimension.type)

0 commit comments

Comments
 (0)