Copy cancel state to fake EntityExplodeEvent.

It's not clear if this change actually solves the underlying issue,
because it has not been tested in a controlled environment. However,
considering the EntityExplodeEvent constructor, which doesn't take a
cancel state value, and the `HIGHEST` priority setting of MobArena's
event handler, the issue is realistic, and this change very likely
solves the issue.

Fixes #704
This commit is contained in:
Andreas Troelsen committed 2021-12-05 16:18:54 +01:00
1 parent 2c12112fd0
commit c80f0375ee
2 files changed
+2

No files matched your search

@@ -203,6 +203,7 @@ public class MAGlobalListener implements Listener
// Account for Spigot's messy extra event
EntityExplodeEvent fake = new EntityExplodeEvent(null, event.getBlock().getLocation(), blocks, event.getYield());
fake.setCancelled(event.isCancelled());
entityExplode(fake);
// Copy the values over