3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

Fix ExplosionPrimeEvent#setFire not working with EnderCrystals

Dieser Commit ist enthalten in:
Phoenix616 2019-03-09 22:29:09 +01:00 committet von md_5
Ursprung 39a287b7da
Commit 8b1588e2f1

Datei anzeigen

@ -39,13 +39,13 @@
if (!damagesource.isExplosion()) {
- this.world.explode((Entity) null, this.locX, this.locY, this.locZ, 6.0F, true);
+ // CraftBukkit start
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 6.0F, true);
+ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 6.0F, false);
+ this.world.getServer().getPluginManager().callEvent(event);
+ if (event.isCancelled()) {
+ this.dead = false;
+ return false;
+ }
+ this.world.explode(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire());
+ this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), true);
+ // CraftBukkit end
}