You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 10, 2025. It is now read-only.
fix: update punishment cache to only fetch active mutes and bans
- Renamed `mutes` and `bans` to `activeMutes` and `activeBans` for clarity.
- Ensured active punishments are correctly fetched and used across the system.
- Added `allowed` property to punishment result types for improved validation logic.
Copy file name to clipboardExpand all lines: surf-cloud-api/surf-cloud-api-common/src/main/kotlin/dev/slne/surf/cloud/api/common/player/punishment/CloudPlayerPunishmentManager.kt
Copy file name to clipboardExpand all lines: surf-cloud-core/surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/PunishmentCacheImpl.kt
Copy file name to clipboardExpand all lines: surf-cloud-core/surf-cloud-core-common/src/main/kotlin/dev/slne/surf/cloud/core/common/player/punishment/CloudPlayerPunishmentManagerBridgeImpl.kt
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -98,7 +98,7 @@ class CloudPlayerPunishmentManagerBridgeImpl : CloudPlayerPunishmentManagerBridg
98
98
returnPrePlayerJoinTask.Result.ERROR
99
99
}
100
100
101
-
val longestBan = cache.bans.find { it.active }
101
+
val longestBan = cache.activeBans.find { it.active }
Copy file name to clipboardExpand all lines: surf-cloud-standalone/src/main/kotlin/dev/slne/surf/cloud/standalone/player/punishment/PunishmentManagerImpl.kt
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -343,14 +343,14 @@ class PunishmentManagerImpl(private val service: PunishmentService) : Punishment
Copy file name to clipboardExpand all lines: surf-cloud-standalone/src/main/kotlin/dev/slne/surf/cloud/standalone/player/punishment/handler/DefaultBanPunishmentHandler.kt
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,7 @@ class DefaultBanPunishmentHandler(private val punishmentManager: PunishmentManag
0 commit comments