1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-14 02:24:16 +02:00

Fix fake explosions.

This commit is contained in:
KHobbits
2012-03-15 06:42:58 +00:00
parent 0629a24d45
commit 8657cd1d29
3 changed files with 8 additions and 57 deletions

View File

@@ -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