Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // EntityLargeFireball
- protected void a(MovingObjectPosition movingobjectposition) {
- if (!this.world.isStatic) {
- if (movingobjectposition.entity != null) {
- movingobjectposition.entity.damageEntity(DamageSource.fireball(this, this.shooter), 6);
- }
- // CraftBukkit start
- ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) org.bukkit.craftbukkit.entity.CraftEntity.getEntity(this.world.getServer(), this));
- this.world.getServer().getPluginManager().callEvent(event);
- if (!event.isCancelled()) {
- // give 'this' instead of (Entity) null so we know what causes the damage
- this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), this.world.getGameRules().getBoolean("mobGriefing"));
- }
- // CraftBukkit end
- this.die();
- }
- }
- // EntityFireball
- if (movingobjectposition != null) {
- this.a(movingobjectposition);
- // CraftBukkit start
- if (this.dead) {
- ProjectileHitEvent phe = new ProjectileHitEvent((org.bukkit.entity.Projectile) this.getBukkitEntity());
- this.world.getServer().getPluginManager().callEvent(phe);
- }
- // CraftBukkit end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement