Skip to content

feat: pass kick message through PlayerBannedEvent for plugin modification#1056

Merged
confuser merged 3 commits intomasterfrom
fix/pin-placeholder-on-kick
Apr 3, 2026
Merged

feat: pass kick message through PlayerBannedEvent for plugin modification#1056
confuser merged 3 commits intomasterfrom
fix/pin-placeholder-on-kick

Conversation

@confuser
Copy link
Copy Markdown
Member

@confuser confuser commented Apr 3, 2026

Add a nullable Message kickMessage field to PlayerBannedEvent on all 6 platforms so external plugins (e.g. WebEnhancer) can modify the kick message before it is sent to the player.

BanCommand and TempBanCommand now build the kick message before calling ban(), pass it through PlayerBanStorage.ban() where [id] is set after create(), and fire PlayerBannedEvent with the message attached. After the event completes, the resolved message is used for the kick.

This enables the [pin] placeholder to be replaced on the initial kick when banning an online player, not just on reconnect denial.

confuser added 3 commits April 3, 2026 16:15
…tion

Add a nullable Message kickMessage field to PlayerBannedEvent on all 6
platforms so external plugins (e.g. WebEnhancer) can modify the kick
message before it is sent to the player.

BanCommand and TempBanCommand now build the kick message before calling
ban(), pass it through PlayerBanStorage.ban() where [id] is set after
create(), and fire PlayerBannedEvent with the message attached. After
the event completes, the resolved message is used for the kick.

This enables the [pin] placeholder to be replaced on the initial kick
when banning an online player, not just on reconnect denial.
…n e2e test

Async RCON commands (bmban/bmunban) return immediately while processing
on a background thread. Fixed sleeps were insufficient on slower CI
servers, causing the "unbanned player can join server" test to time out.
Replace notification-based polling (unreliable across platforms) with
createBotWithRetry for the "unbanned player can join server" test and
increase sleep durations. Kicked connections resolve in ~1-2s so retries
are cheap, and the approach doesn't depend on staffBot message delivery.
@confuser confuser merged commit c49655d into master Apr 3, 2026
18 checks passed
@confuser confuser deleted the fix/pin-placeholder-on-kick branch April 3, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant