forked from SteamWar/SteamWar
Remove Stats
This commit is contained in:
@@ -195,7 +195,6 @@ object TNTLeagueGame {
|
|||||||
if (state != GameState.RUNNING) return
|
if (state != GameState.RUNNING) return
|
||||||
end()
|
end()
|
||||||
plugin.server.onlinePlayers.forEach { message.send("TEAM_WIN", it, message.parse(tntLeagueTeam.name, it).colorByTeam(tntLeagueTeam)) }
|
plugin.server.onlinePlayers.forEach { message.send("TEAM_WIN", it, message.parse(tntLeagueTeam.name, it).colorByTeam(tntLeagueTeam)) }
|
||||||
statistic(tntLeagueTeam, reason)
|
|
||||||
explode(tntLeagueTeam.opposite)
|
explode(tntLeagueTeam.opposite)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,7 +202,6 @@ object TNTLeagueGame {
|
|||||||
if (state != GameState.RUNNING) return
|
if (state != GameState.RUNNING) return
|
||||||
end()
|
end()
|
||||||
message.broadcast("DRAW")
|
message.broadcast("DRAW")
|
||||||
statistic(null, reason)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun explode(team: TNTLeagueTeam) {
|
fun explode(team: TNTLeagueTeam) {
|
||||||
@@ -217,32 +215,6 @@ object TNTLeagueGame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun statistic(winTeam: TNTLeagueTeam?, reason: WinReason) {
|
|
||||||
val fightId = Fight.create(
|
|
||||||
"TNTLeague",
|
|
||||||
world.name,
|
|
||||||
start,
|
|
||||||
TNTLeagueConfig.config.gameTime - gameTimeRemaining,
|
|
||||||
SteamwarUser.get(blueTeam.leader!!.uniqueId).id,
|
|
||||||
SteamwarUser.get(redTeam.leader!!.uniqueId).id,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
when (winTeam) {
|
|
||||||
blueTeam -> 1
|
|
||||||
redTeam -> 2
|
|
||||||
else -> 0
|
|
||||||
},
|
|
||||||
when (reason) {
|
|
||||||
WinReason.TIMEOUT -> "TIMEOUT"
|
|
||||||
WinReason.DESTROYED -> "DESTROYED"
|
|
||||||
WinReason.LEAVE -> "LEAVE"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
addTeamMember(blueTeam, fightId)
|
|
||||||
addTeamMember(redTeam, fightId)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun addTeamMember(team: TNTLeagueTeam, fightId: Int) {
|
private fun addTeamMember(team: TNTLeagueTeam, fightId: Int) {
|
||||||
team.members.filter { team.leader != it }
|
team.members.filter { team.leader != it }
|
||||||
.forEach {
|
.forEach {
|
||||||
|
|||||||
Reference in New Issue
Block a user