Skip to content

Commit 52e1cbe

Browse files
committed
🐛 (wayzer/map/betterTeam) 状态未重置bug;原版分队可能不均衡bug
1 parent efe7802 commit 52e1cbe

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/wayzer/map/betterTeam.kts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ onEnable {
5151
updateBannedTeam(true)
5252
}
5353
listen<EventType.PlayEvent> { updateBannedTeam(true) }
54+
listen<EventType.ResetEvent> {
55+
bannedTeam = emptySet()
56+
teams.clear()
57+
}
5458
//custom gameover
5559
listen<EventType.BlockDestroyEvent> { e ->
5660
if (state.gameOver || !state.rules.pvp) return@listen
@@ -63,8 +67,10 @@ listen<EventType.BlockDestroyEvent> { e ->
6367
}
6468
}
6569
}
66-
listen<EventType.ResetEvent> {
67-
bannedTeam = emptySet()
70+
//fix bug
71+
listen<EventType.PlayerConnectionConfirmed> {
72+
//As team assigned in connect may be wrong.
73+
changeTeam(it.player)
6874
}
6975

7076
fun updateBannedTeam(force: Boolean = false) {

0 commit comments

Comments
 (0)