Update to Minecraft 1.14.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-05-28 06:30:00 +10:00
parent 5f2275f40a
commit 569660215f
57 changed files with 385 additions and 394 deletions

View File

@@ -25,7 +25,7 @@
}
}
@@ -81,10 +90,23 @@
@@ -81,9 +90,22 @@
return false;
} else {
if (!this.dead && !this.world.isClientSide) {
@@ -35,18 +35,17 @@
+ }
+ // CraftBukkit end
this.die();
if (!this.world.isClientSide) {
if (!damagesource.isExplosion()) {
- this.world.explode((Entity) null, this.locX, this.locY, this.locZ, 6.0F, Explosion.Effect.DESTROY);
+ // CraftBukkit start
+ 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.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), Explosion.Effect.DESTROY);
+ // CraftBukkit end
}
if (!damagesource.isExplosion()) {
- this.world.explode((Entity) null, this.locX, this.locY, this.locZ, 6.0F, Explosion.Effect.DESTROY);
+ // CraftBukkit start
+ 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.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), Explosion.Effect.DESTROY);
+ // CraftBukkit end
}
this.a(damagesource);
this.a(damagesource);