-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add whitelist feature #451
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Smuu <[email protected]>
Signed-off-by: Smuu <[email protected]>
Signed-off-by: Smuu <[email protected]>
Signed-off-by: Smuu <[email protected]>
/// Whether to enable the whitelist | ||
pub white_list: bool, | ||
/// Whether to enforce the whitelist | ||
pub enforce_whitelist: bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both variables are used in the vanilla server.properties
file. You can enable the whitelist but not enforce it. If you enforce it, players will be kicked when you reload the whitelist if they are not whitelisted.
From the Minecraft wiki:
white-list
Whether the whitelist is enabled.
With a whitelist enabled, users not on the whitelist cannot connect. Intended for private servers, such as those for real-life friends or strangers carefully selected via an application process, for example.
false - No white list is used. true - The file whitelist.json is used to generate the white list.
Note: Ops are automatically whitelisted, and there is no need to add them to the whitelist.
enforce-whitelist
Whether to enforce changes to the whitelist.
When this option as well as the whitelist is enabled, players not present on the whitelist get kicked from the server after the server reloads the whitelist file.
false - Online players that are not on the whitelist are not kicked. true - Online players that are not on the whitelist are kicked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhh okay, I mean, I'm fine with leaving it then
Signed-off-by: Smuu <[email protected]>
You can always reopen PR's, I would prefer this next time instead of making a new one |
I tried. First, it said I can only do that when adding a new commit. Then I added a new commit but could still not reopen the PR. I'm unsure if this was a permission issue or if I missed something. |
Okay @smuu can you may fix Ci and conflicts |
Description
I accidentally closed the other PR. Recreated it here.
whitelist
command and the correspondingwhitelist.json
file to keep track of the whitelisted users.Testing
Please follow our Coding Guidelines