We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.20
So if you try to use BossBar#viewers to loop the current viewers and remove viewers from the BossBar, it doesn't produce the excepted result.
BossBar#viewers
Just try to use this code to test, and you will be able to reproduce the unexcepted result.
@Test void test() { PlayerMock player = server.addPlayer(); BossBar bossBar = BossBar.bossBar(Component.text("hello world"),1, BossBar.Color.RED, BossBar.Overlay.PROGRESS); bossBar.addViewer(player); assertTrue(player.getBossBars().contains(bossBar)); //Passed :D bossBar.viewers().forEach(viewer -> { if (viewer instanceof Player p) { bossBar.removeViewer(p); } }); assertFalse(player.getBossBars().contains(bossBar)); //Failed :( }
No response
The text was updated successfully, but these errors were encountered:
I can reproduce this.
We need to register a service for this to work properly
Sorry, something went wrong.
No branches or pull requests
Is there an existing issue for this?
Are you using the latest version of MockBukkit?
Minecraft Version
1.20
Describe the bug
So if you try to use
BossBar#viewers
to loop the current viewers and remove viewers from the BossBar, it doesn't produce the excepted result.Reproducible Test
Just try to use this code to test, and you will be able to reproduce the unexcepted result.
Anything else?
No response
The text was updated successfully, but these errors were encountered: