Skip to content

Commit

Permalink
Fixed a bug that prevented deleting a race.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nlkomaru committed Feb 25, 2022
1 parent d98967c commit b750646
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import dev.nikomaru.raceassist.RaceAssist.Companion.plugin
import dev.nikomaru.raceassist.database.*
import dev.nikomaru.raceassist.utils.CommandUtils
import dev.nikomaru.raceassist.utils.Lang
import dev.nikomaru.raceassist.utils.RaceStaffUtils.removeAllStaff
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import org.bukkit.entity.Player
Expand All @@ -46,8 +45,8 @@ class SettingDeleteCommand {
PlayerList.deleteWhere { PlayerList.raceId eq raceId }
BetList.deleteWhere { BetList.raceId eq raceId }
BetSetting.deleteWhere { BetSetting.raceId eq raceId }
RaceStaff.deleteWhere { RaceStaff.raceId eq raceId }
sender.sendMessage(Lang.getComponent("to-delete-race-and-so-on", sender.locale()))
removeAllStaff(raceId)
}
} else {
canDelete[sender.uniqueId] = true
Expand Down

0 comments on commit b750646

Please sign in to comment.