Advertisement
riking

Untitled

Mar 24th, 2013
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.42 KB | None | 0 0
  1. // EntityLargeFireball
  2.     protected void a(MovingObjectPosition movingobjectposition) {
  3.         if (!this.world.isStatic) {
  4.             if (movingobjectposition.entity != null) {
  5.                 movingobjectposition.entity.damageEntity(DamageSource.fireball(this, this.shooter), 6);
  6.             }
  7.  
  8.             // CraftBukkit start
  9.             ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) org.bukkit.craftbukkit.entity.CraftEntity.getEntity(this.world.getServer(), this));
  10.             this.world.getServer().getPluginManager().callEvent(event);
  11.  
  12.             if (!event.isCancelled()) {
  13.                 // give 'this' instead of (Entity) null so we know what causes the damage
  14.                 this.world.createExplosion(this, this.locX, this.locY, this.locZ, event.getRadius(), event.getFire(), this.world.getGameRules().getBoolean("mobGriefing"));
  15.             }
  16.             // CraftBukkit end
  17.  
  18.             this.die();
  19.         }
  20.     }
  21.  
  22. // EntityFireball
  23.             if (movingobjectposition != null) {
  24.                 this.a(movingobjectposition);
  25.  
  26.                 // CraftBukkit start
  27.                 if (this.dead) {
  28.                     ProjectileHitEvent phe = new ProjectileHitEvent((org.bukkit.entity.Projectile) this.getBukkitEntity());
  29.                     this.world.getServer().getPluginManager().callEvent(phe);
  30.                 }
  31.                 // CraftBukkit end
  32.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement