-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Island#getMembers() should not return banned players #1132
Comments
Oh, the docs on the method clearly says: But I will leave the closing up to Poslovitch and Tasty. 😕 |
There exist 2 methods: I think this should be considered again, as #627 was closed, and we run in the same issue again. |
I agree to keep this open. This will have to be done as part of a major API rework though. |
Edited Unfortunately, "major API rework" can mean breaking dependent code and systems already running so if not done carefully can cause problems. If we add new API then they may work but eventually there’s another thing that will come up. That's what happens with public APIs - in a perfect world, we'd change the name but it is what it is. We have clear javadocs and already and the |
I would suggest either close this issue, and leave everything as it is, or deprecate some methods. Java has a deprecation feature, which is directly for this usage. We could deprecate #getMembers and create proper methods. |
I'm open to a PR on this. Deprecate getMembers and replace with something else that has a better description. I think that particular method is likely not used that much. |
Description
Describe the bug
I reported this on TeamChat addon issue tracker as well. Banned users were being sent teamchat messages, but they cannot be members. Technically I think banned users are done that way that they actually are considered as members, but some methods should ignore them.
Steps to reproduce the behavior
getIslands().getIsland(player.getWorld(), player.getUniqueId()).getMembers().keySet().stream()
Expected behavior
Filter banned users out, so some methods should return values as expected.
Or
Rework of how banned users are present
Environment
BentoBox Version (Mandatory)
Plugins (Optional)
Additional context (Optional)
The text was updated successfully, but these errors were encountered: