diff options
author | Andrew Ardill <andrew.ardill@gmail.com> | 2011-12-05 19:13:10 +1100 |
---|---|---|
committer | Andrew Ardill <andrew.ardill@gmail.com> | 2011-12-05 19:23:40 +1100 |
commit | b1a3aa602a8021228e3cdf429cb613c590ceb122 (patch) | |
tree | 8021307349caffcf78fa6e7aefbf0cfe0d33125a /src/main/java/net/minecraft/server/Explosion.java | |
parent | 8363eadcabe1ac9277842e75d56a7409ef6e3ced (diff) | |
download | craftbukkit-b1a3aa602a8021228e3cdf429cb613c590ceb122.tar craftbukkit-b1a3aa602a8021228e3cdf429cb613c590ceb122.tar.gz craftbukkit-b1a3aa602a8021228e3cdf429cb613c590ceb122.tar.lz craftbukkit-b1a3aa602a8021228e3cdf429cb613c590ceb122.tar.xz craftbukkit-b1a3aa602a8021228e3cdf429cb613c590ceb122.zip |
Clean-up some events to maintain general style
Diffstat (limited to 'src/main/java/net/minecraft/server/Explosion.java')
-rw-r--r-- | src/main/java/net/minecraft/server/Explosion.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java index 1d67dccf..739f1f49 100644 --- a/src/main/java/net/minecraft/server/Explosion.java +++ b/src/main/java/net/minecraft/server/Explosion.java @@ -7,6 +7,7 @@ import java.util.Random; import java.util.Set; // CraftBukkit start +import org.bukkit.Bukkit; import org.bukkit.entity.TNTPrimed; import org.bukkit.event.entity.EntityDamageByBlockEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent; @@ -117,7 +118,6 @@ public class Explosion { double d10 = (1.0D - d7) * d9; // CraftBukkit start - explosion damage hook - org.bukkit.Server server = this.world.getServer(); org.bukkit.entity.Entity damagee = (entity == null) ? null : entity.getBukkitEntity(); int damageDone = (int) ((d10 * d10 + d10) / 2.0D * 8.0D * (double) this.size + 1.0D); @@ -127,7 +127,7 @@ public class Explosion { // TODO: get the x/y/z of the tnt block? // does this even get called ever? @see EntityTNTPrimed - not BlockTNT or whatever EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(null, damagee, EntityDamageEvent.DamageCause.BLOCK_EXPLOSION, damageDone); - server.getPluginManager().callEvent(event); + Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { entity.damageEntity(DamageSource.EXPLOSION, event.getDamage()); @@ -144,7 +144,7 @@ public class Explosion { damageCause = EntityDamageEvent.DamageCause.ENTITY_EXPLOSION; } EntityDamageByEntityEvent event = new EntityDamageByEntityEvent(damager, damagee, damageCause, damageDone); - server.getPluginManager().callEvent(event); + Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { entity.damageEntity(DamageSource.EXPLOSION, event.getDamage()); |