mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-06 11:24:39 +08:00
Fix Minecart class rename
Lets use consistent versions in the code base Bukkit: 1700 CB: 2648
This commit is contained in:
parent
24a9a74fd5
commit
6185581962
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
BIN
lib/bukkit.jar
BIN
lib/bukkit.jar
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user