-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Permission value can be unlimited #560
Conversation
value can be negative to set unlimited value like max-bans, ...
I don't understand what the PR's doing. @DarkRails ? @tastybento Would that actually be an addition? What's the point of the "sanity check" we're doing with the permissions, by the way? |
in the config you can set a max amount of ban per island & if set to -1. It is supposed to set it to unlimited but the ban limit can also be defined by a permission, the method to get max ban limit for a user is int banLimit = issuer.getPermissionValue(getPermissionPrefix() + "ban.maxlimit", getIWM().getBanLimit(getWorld())); default ban limit: -1 (supposed to be unlimited) but the default value -1 is replaced by 1 by the getPermissionValue method. I hope you understand what I mean. |
I understand what you mean, however, I'm afraid it may cause bugs. @tastybento, I really need your review on that. |
So, Btw... is it even possible to define permission with text |
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.
This makes sense.
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.
So, this part is OK, but other places need to be fixed to enable -1 to be valid.
@BONNe You can specify -1 in a permission, but like you say, this change alone won't work. The use case is that the ban limit has been set to say 3 in config.yml, but the admin wants to give some players the ability to have unlimited bans. To do that, they would give the permission bskyblock.ban.maxlimit.-1. This code change won't do it, so I'll fix it. |
@DarkRails Thanks for the tip. In the end I have to do more coding, but now using -1 should work. |
Values can be negative to set unlimite like max-bans, ...