[SPIGOT-743] Explosion event surprise... Created: 26/Mar/15 Updated: 10/May/19 Resolved: 13/Apr/15 |
|
Status: | Closed |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Andrew | Assignee: | Unassigned |
Resolution: | Invalid | Votes: | 0 |
Labels: | 1.8, entity, spigot, world |
Description |
e.blockList().clear() don't work in EntityExplosionEvent. It cause destroying blocks which mustn't be destroyed by explosion and I have to force stop my server to prevent mass griefing on static map (without block changing -> so without backups too). |
Comments |
Comment by Wyatt Childers [ 10/May/19 ] |
I'm WAY late to the party, I've been away from bukkit for quite some time now, but WorldGuard was actually affected by this. We do use `event.blockList().clear()`, this issue only affects explosions generated by createExplosion though because it effectively NOOPs the existing logic for entity explosion events https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/e387d8dc7752a7f03e6baa1dadaf66ec2e7e3512. This manifested itself for us in bug https://dev.enginehub.org/youtrack/issue/WORLDGUARD-3843. I stumbled upon it while upgrading a very old bukkit code base. This should be fixed at least in WorldGuard for our next release, but I wanted to clarify here that this was indeed a breaking change; otherwise I apologize for the necro bump. |
Comment by Sycholic [ 30/Mar/15 ] |
you can check that by using --rev 1.8 with buildtools then and build a 1.8 version. WTB exact version choices for builds... another good reason to add this ability. also just checked... might wanna look at how worldguard blocks creeper explosions, because it still works to block, 'block damage' but still allows creepers to hurt surrounding entities. (just verified that on the latest version) |
Comment by Black Hole [ 27/Mar/15 ] |
Spigot recently added an BlockExplosionEvent: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/1f0b2e88fe5a69e151ad5a9beb34562c7bd3c468 The way this event was added might be breaking for some plugins. So you have to handle the BlockExplosionEvent, too. |
Comment by Andrew [ 27/Mar/15 ] |
Nope. It works fine 2 years as I know it. |
Comment by Chris Lutte [ 27/Mar/15 ] |
It clearly doesn't work fine at all other times or you wouldn't be here. Can you provide an example or the explosions your trying to block as the above would not work in various cases. |
Comment by Andrew [ 27/Mar/15 ] |
Because e.blockList().clear() works fine all the time |
Comment by MattBDev [ 26/Mar/15 ] |
Isn't there a Block Explosion event? I also am wondering why you wouldn't be canceling the event.... |
Comment by Nathan Wolf [ 26/Mar/15 ] |
Don't you have to cancel the event to prevent block destruction? I think that block list is read-only. |