[PR #2410] [MERGED] Kick unlisted players when enforce-whitelist is on #4289

Closed
opened 2026-11-03 04:16:05 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2410
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/enforce-whitelist


📝 Commits (1)

  • 9ae3882 Kick unlisted players when enforce-whitelist is on

📊 Changes

1 file changed (+47 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/game/dedicated.rs (+47 -0)

📄 Description

What and why

enforce-whitelist was read from server.properties but never used. Taking a player off the whitelist (or turning the whitelist on, reloading it, or removing an operator) left players who are not listed on the server. Now, with enforce-whitelist=true and the whitelist on, the console's whitelist remove, whitelist reload, whitelist on (when it was off) and deop disconnect every online player who is not on the whitelist, with "You are not white-listed on this server!". As in vanilla, operators are not spared by the check.

Vanilla reference

  • MinecraftServer.kickUnlistedPlayers
  • WhitelistCommand.reload, removePlayers, enableWhitelist
  • DeOpCommands.deopPlayers

Self-check

cargo check -p horizon-client passes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2410 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/enforce-whitelist` --- ### 📝 Commits (1) - [`9ae3882`](https://github.com/horizon-rust/horizon/commit/9ae3882c1af4c74352e69d7a0ea6352b802ebe1f) Kick unlisted players when enforce-whitelist is on ### 📊 Changes **1 file changed** (+47 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/dedicated.rs` (+47 -0) </details> ### 📄 Description ## What and why `enforce-whitelist` was read from `server.properties` but never used. Taking a player off the whitelist (or turning the whitelist on, reloading it, or removing an operator) left players who are not listed on the server. Now, with `enforce-whitelist=true` and the whitelist on, the console's `whitelist remove`, `whitelist reload`, `whitelist on` (when it was off) and `deop` disconnect every online player who is not on the whitelist, with "You are not white-listed on this server!". As in vanilla, operators are not spared by the check. ## Vanilla reference - `MinecraftServer.kickUnlistedPlayers` - `WhitelistCommand.reload`, `removePlayers`, `enableWhitelist` - `DeOpCommands.deopPlayers` ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:16:05 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4289
No description provided.