feat: add simpleclans.other.clan-size.* permission node#443
Open
Tomut0 wants to merge 4 commits intoRoinujNosde:masterfrom
Open
feat: add simpleclans.other.clan-size.* permission node#443Tomut0 wants to merge 4 commits intoRoinujNosde:masterfrom
simpleclans.other.clan-size.* permission node#443Tomut0 wants to merge 4 commits intoRoinujNosde:masterfrom
Conversation
Contributor
|
Would this be a global clan size or per-clan? I'm a little confused |
Collaborator
Author
it's per-clan. |
RoinujNosde
reviewed
Oct 14, 2024
| int maxMembers = !clan.isVerified() ? plugin.getSettingsManager().getInt(CLAN_UNVERIFIED_MAX_MEMBERS) : plugin.getSettingsManager().getInt(CLAN_MAX_MEMBERS); | ||
|
|
||
| if (maxMembers > 0 && maxMembers > clan.getSize()) { | ||
| if (plugin.getSettingsManager().getInt(CLAN_MAX_MEMBERS) > 0 && clan.getMaxSize() > clan.getSize()) { |
Owner
There was a problem hiding this comment.
why not use getMaxSize on both?
Collaborator
Author
There was a problem hiding this comment.
I suppose that config value should have more effect than a dynamic flag
This file contains hidden or 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
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.
One of the problem that could happen here is when somebody changes the permission node number,
it wouldn't affect on previous clans. 🤔
That's why mods could have a command to modify the
max-sizeflag.If you agree, I'll make another PR about the command.
Or should it be commited here?