-
Notifications
You must be signed in to change notification settings - Fork 31
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
Server whitelist/blacklist #146
Merged
MattSturgeon
merged 2 commits into
MinecraftFreecam:main
from
MattSturgeon:config/server-whitelist
Apr 21, 2024
Merged
Server whitelist/blacklist #146
MattSturgeon
merged 2 commits into
MinecraftFreecam:main
from
MattSturgeon:config/server-whitelist
Apr 21, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MattSturgeon
commented
Dec 31, 2023
MattSturgeon
commented
Dec 31, 2023
MattSturgeon
commented
Dec 31, 2023
18e5da9
to
6b913b4
Compare
MattSturgeon
commented
Jan 2, 2024
Comment on lines
111
to
124
public List<String> whitelist = Collections.emptyList(); | ||
public List<String> blacklist = Collections.emptyList(); |
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.
These might benefit from some PrefixText
or a Tooltip
. Perhaps something along the lines of
Add server IPs to this list using the button marked ⊕.
Freecam will only be usable on servers whose IP exactly matches something in this list (case-insensitive).
MattSturgeon
commented
Jan 2, 2024
common/src/main/java/net/xolt/freecam/config/gui/ServerRestrictionDependencies.java
Outdated
Show resolved
Hide resolved
64a944a
to
ff41d10
Compare
MattSturgeon
commented
Jan 2, 2024
This was referenced Jan 2, 2024
7632973
to
cc44153
Compare
hashalite
approved these changes
Apr 21, 2024
Allow switching between whitelist, blacklist, & no restriction.
Show Whitelist config in whitelist mode, and Blacklist in blacklist mode. Don't show either in "no restriction" mode.
cc44153
to
2cf0ca8
Compare
hashalite
approved these changes
Apr 21, 2024
hashalite
approved these changes
Apr 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Includes the same config-extension refactoring commit from #143.
Allows the user to setup a whitelist or blacklist in their Freecam config.
If enabled, this will prevent freecam from activating on the restricted servers.
If notifications are enabled,
"Freecam is restricted on the current server (server_ip_here)."
will be shown when attempting to toggle freecam.Not convinced my naming/wording (or my config layout) is optimal, so I'm open to feedback & suggestions.
I noticed when testing that cloth-config's
StringListListEntry
is kinda janky; adding a list-entry doesn't focus the new text field; the text field is invisible, so it's not obvious you can click on it. We may be able to work around this with some mixins and/or autoconfig extensions.Testing logged in
To test out using DevLogin, you'll want to uncomment the dependency and add this to line 74 of
fabric/build.gradle
:Then run
runNormalLoggedIn
orrunModrinthLoggedIn
. TherunLoggedIn
task created in the rootbuild.gradle
won't work (I'll fix that at some point, will probably wait for devlogin to finish their neoforge support).Alternatively, use DevAuth by either dropping it into
mods
and settingdefaultEnabled
ordevauth.enabled
as required, or using the devauth PR.Fixes #117