diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-03-16 08:55:39 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-03-16 08:55:39 +0000 |
commit | c7564796a9af6f2ef564a38a651fe95f45416536 (patch) | |
tree | 1aacc33a83317d869575f6e5bbf671fc4e2c2d88 | |
parent | a2fbbf6f558a17847b772f969d69c5f154daa453 (diff) | |
download | Essentials-c7564796a9af6f2ef564a38a651fe95f45416536.tar Essentials-c7564796a9af6f2ef564a38a651fe95f45416536.tar.gz Essentials-c7564796a9af6f2ef564a38a651fe95f45416536.tar.lz Essentials-c7564796a9af6f2ef564a38a651fe95f45416536.tar.xz Essentials-c7564796a9af6f2ef564a38a651fe95f45416536.zip |
Fix Minecart class rename
Lets use consistent versions in the code base
Bukkit: 1700 CB: 2648
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Essentials.java | 2 | ||||
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java | 23 |
2 files changed, 13 insertions, 12 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java index c54e19af3..a0b01f5a2 100644 --- a/Essentials/src/com/earth2me/essentials/Essentials.java +++ b/Essentials/src/com/earth2me/essentials/Essentials.java @@ -69,7 +69,7 @@ import org.yaml.snakeyaml.error.YAMLException; public class Essentials extends JavaPlugin implements IEssentials { - public static final int BUKKIT_VERSION = 2646; + public static final int BUKKIT_VERSION = 2648; private static final Logger LOGGER = Logger.getLogger("Minecraft"); private transient ISettings settings; private final transient TNTExplodeListener tntListener = new TNTExplodeListener(this); diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java index b2b2baa1d..faa2dd5c7 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java @@ -4,6 +4,7 @@ import com.earth2me.essentials.IEssentials; import com.earth2me.essentials.User;
import java.util.Locale;
import org.bukkit.entity.*;
+import org.bukkit.entity.minecart.ExplosiveMinecart;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
@@ -102,14 +103,14 @@ public class EssentialsProtectEntityListener implements Listener event.setCancelled(true);
return;
}
-
- if (eAttack instanceof MinecartTNT && prot.getSettingBool(ProtectConfig.prevent_tntminecart_playerdmg)
+
+ if (eAttack instanceof ExplosiveMinecart && prot.getSettingBool(ProtectConfig.prevent_tntminecart_playerdmg)
&& !(target instanceof Player && shouldBeDamaged(user, "tnt-minecart")))
{
event.setCancelled(true);
return;
}
-
+
// PVP Settings
if (target instanceof Player && eAttack instanceof Player
&& prot.getSettingBool(ProtectConfig.disable_pvp)
@@ -223,25 +224,25 @@ public class EssentialsProtectEntityListener implements Listener && prot.getSettingBool(ProtectConfig.prevent_tnt_explosion))
{
event.setCancelled(true);
-
+
}
else if ((entity instanceof Fireball || entity instanceof SmallFireball)
&& prot.getSettingBool(ProtectConfig.prevent_fireball_explosion))
{
event.setCancelled(true);
-
+
}
else if ((entity instanceof WitherSkull)
&& prot.getSettingBool(ProtectConfig.prevent_witherskull_explosion))
{
event.setCancelled(true);
}
- else if ((entity instanceof MinecartTNT)
+ else if ((entity instanceof ExplosiveMinecart)
&& prot.getSettingBool(ProtectConfig.prevent_tntminecart_explosion))
{
event.setCancelled(true);
}
-
+
}
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
@@ -317,10 +318,10 @@ public class EssentialsProtectEntityListener implements Listener public void onPaintingBreak(HangingBreakByEntityEvent event)
{
if ((event.getCause() == HangingBreakEvent.RemoveCause.ENTITY)
- && ((event.getRemover() instanceof Creeper) && prot.getSettingBool(ProtectConfig.prevent_creeper_explosion)
- || (((event.getRemover() instanceof Fireball) || (event.getRemover() instanceof SmallFireball)) && prot.getSettingBool(ProtectConfig.prevent_fireball_explosion))
- || ((event.getRemover() instanceof TNTPrimed) && prot.getSettingBool(ProtectConfig.prevent_tnt_explosion))
- || ((event.getRemover() instanceof WitherSkull) && prot.getSettingBool(ProtectConfig.prevent_witherskull_explosion))))
+ && ((event.getRemover() instanceof Creeper) && prot.getSettingBool(ProtectConfig.prevent_creeper_explosion)
+ || (((event.getRemover() instanceof Fireball) || (event.getRemover() instanceof SmallFireball)) && prot.getSettingBool(ProtectConfig.prevent_fireball_explosion))
+ || ((event.getRemover() instanceof TNTPrimed) && prot.getSettingBool(ProtectConfig.prevent_tnt_explosion))
+ || ((event.getRemover() instanceof WitherSkull) && prot.getSettingBool(ProtectConfig.prevent_witherskull_explosion))))
{
event.setCancelled(true);
}
|