summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsProtect')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java7
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