From 7f4ef2a447676383ce32bb3052bced4178b4a8e8 Mon Sep 17 00:00:00 2001 From: TONY_All Date: Fri, 16 Jun 2023 01:34:10 +0800 Subject: [PATCH] optimize MAXMC-T-2 --- .../kotlin/cc/maxmc/blastingcrisis/listener/GameListener.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/cc/maxmc/blastingcrisis/listener/GameListener.kt b/src/main/kotlin/cc/maxmc/blastingcrisis/listener/GameListener.kt index 39be5b1..3cab71a 100644 --- a/src/main/kotlin/cc/maxmc/blastingcrisis/listener/GameListener.kt +++ b/src/main/kotlin/cc/maxmc/blastingcrisis/listener/GameListener.kt @@ -5,6 +5,7 @@ import cc.maxmc.blastingcrisis.game.team import cc.maxmc.blastingcrisis.misc.Area import cc.maxmc.blastingcrisis.misc.GameManager import cc.maxmc.blastingcrisis.misc.debug +import cc.maxmc.blastingcrisis.misc.toPlayerLocation import org.bukkit.Location import org.bukkit.event.block.BlockBreakEvent import org.bukkit.event.block.BlockPlaceEvent @@ -67,6 +68,6 @@ object GameListener { @SubscribeEvent fun onRespawn(respawnEvent: PlayerRespawnEvent) { val team = respawnEvent.player.team ?: return // ignore none game player - respawnEvent.respawnLocation = team.teamInfo.spawn + respawnEvent.respawnLocation = team.teamInfo.spawn.toPlayerLocation() } } \ No newline at end of file