Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Kieaer committed Feb 23, 2024
1 parent b1d0547 commit 411e117
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/essentials/Event.kt
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ object Event {
json.forEachIndexed { index, jsonValue ->
if (jsonValue.asObject().get("id").asString() == it.uuid) {
json.remove(index)
return@forEachIndexed
}
}
Fi(Config.banList).writeString(json.toString(Stringify.HJSON))
Expand All @@ -709,6 +710,7 @@ object Event {
json.forEachIndexed { index, jsonValue ->
if (jsonValue.asObject().get("ip").asArray().contains(JsonValue.valueOf(it.ip))) {
json.remove(index)
return@forEachIndexed
}
}
Fi(Config.banList).writeString(json.toString(Stringify.HJSON))
Expand Down

0 comments on commit 411e117

Please # to comment.