diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-03-15 06:42:58 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-03-15 06:42:58 +0000 |
commit | bada36be686ebe8ceac0edc461a6cd5f970d5a44 (patch) | |
tree | f56d5ed8fc1f0d1cbbb198a0a1850db5b7791adc /EssentialsProtect | |
parent | e5e81eda72af4d8af5564b6aec43ee0a72067f26 (diff) | |
download | Essentials-bada36be686ebe8ceac0edc461a6cd5f970d5a44.tar Essentials-bada36be686ebe8ceac0edc461a6cd5f970d5a44.tar.gz Essentials-bada36be686ebe8ceac0edc461a6cd5f970d5a44.tar.lz Essentials-bada36be686ebe8ceac0edc461a6cd5f970d5a44.tar.xz Essentials-bada36be686ebe8ceac0edc461a6cd5f970d5a44.zip |
Fix fake explosions.
Diffstat (limited to 'EssentialsProtect')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java index d19f48abb..fe3cadbbe 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java @@ -2,7 +2,6 @@ package com.earth2me.essentials.protect; import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User; -import com.earth2me.essentials.craftbukkit.FakeExplosion; import java.util.Locale; import org.bukkit.Material; import org.bukkit.block.Block; @@ -204,11 +203,11 @@ public class EssentialsProtectEntityListener implements Listener if (event.getEntity() instanceof EnderDragon && prot.getSettingBool(ProtectConfig.prevent_enderdragon_blockdmg)) { + event.setCancelled(true); if (prot.getSettingBool(ProtectConfig.enderdragon_fakeexplosions)) { - FakeExplosion.createExplosion(event, ess.getServer(), ess.getServer().getOnlinePlayers()); + event.getLocation().getWorld().createExplosion(event.getLocation(), 0F); } - event.setCancelled(true); return; } else if (event.getEntity() instanceof Creeper @@ -217,8 +216,8 @@ public class EssentialsProtectEntityListener implements Listener || (maxHeight >= 0 && event.getLocation().getBlockY() > maxHeight))) { //Nicccccccccce plaaacccccccccce.. - FakeExplosion.createExplosion(event, ess.getServer(), ess.getServer().getOnlinePlayers()); event.setCancelled(true); + event.getLocation().getWorld().createExplosion(event.getLocation(), 0F); return; } else if (event.getEntity() instanceof TNTPrimed |