fix MAXMC-T-2
This commit is contained in:
parent
f1ae6d7f4c
commit
1053fde43f
|
|
@ -1,6 +1,7 @@
|
||||||
package cc.maxmc.blastingcrisis.listener
|
package cc.maxmc.blastingcrisis.listener
|
||||||
|
|
||||||
import cc.maxmc.blastingcrisis.game.GamePlaceBreakRule
|
import cc.maxmc.blastingcrisis.game.GamePlaceBreakRule
|
||||||
|
import cc.maxmc.blastingcrisis.game.team
|
||||||
import cc.maxmc.blastingcrisis.misc.Area
|
import cc.maxmc.blastingcrisis.misc.Area
|
||||||
import cc.maxmc.blastingcrisis.misc.GameManager
|
import cc.maxmc.blastingcrisis.misc.GameManager
|
||||||
import cc.maxmc.blastingcrisis.misc.debug
|
import cc.maxmc.blastingcrisis.misc.debug
|
||||||
|
|
@ -10,6 +11,7 @@ import org.bukkit.event.block.BlockPlaceEvent
|
||||||
import org.bukkit.event.entity.EntityExplodeEvent
|
import org.bukkit.event.entity.EntityExplodeEvent
|
||||||
import org.bukkit.event.player.PlayerInteractEvent
|
import org.bukkit.event.player.PlayerInteractEvent
|
||||||
import org.bukkit.event.player.PlayerMoveEvent
|
import org.bukkit.event.player.PlayerMoveEvent
|
||||||
|
import org.bukkit.event.player.PlayerRespawnEvent
|
||||||
import taboolib.common.platform.event.SubscribeEvent
|
import taboolib.common.platform.event.SubscribeEvent
|
||||||
import taboolib.platform.util.sendLang
|
import taboolib.platform.util.sendLang
|
||||||
|
|
||||||
|
|
@ -61,4 +63,10 @@ object GameListener {
|
||||||
placeEvent.isCancelled = true
|
placeEvent.isCancelled = true
|
||||||
player.sendLang("game_cant_place_block")
|
player.sendLang("game_cant_place_block")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
fun onRespawn(respawnEvent: PlayerRespawnEvent) {
|
||||||
|
val team = respawnEvent.player.team ?: return // ignore none game player
|
||||||
|
respawnEvent.respawnLocation = team.teamInfo.spawn
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue