@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user