optimize MAXMC-T-2

This commit is contained in:
TONY_All 2023-06-16 01:34:10 +08:00
parent 1053fde43f
commit 7f4ef2a447
Signed by: tony_all
GPG Key ID: 08A2261D5D6F746A
1 changed files with 2 additions and 1 deletions

View File

@ -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()
}
}