diff options
Diffstat (limited to 'EssentialsProtect/src/net/ess3/protect')
6 files changed, 20 insertions, 20 deletions
diff --git a/EssentialsProtect/src/net/ess3/protect/EssentialsConnect.java b/EssentialsProtect/src/net/ess3/protect/EssentialsConnect.java index 7ccbd1f92..b91f6740e 100644 --- a/EssentialsProtect/src/net/ess3/protect/EssentialsConnect.java +++ b/EssentialsProtect/src/net/ess3/protect/EssentialsConnect.java @@ -11,8 +11,8 @@ import org.bukkit.plugin.Plugin; public class EssentialsConnect { private static final Logger LOGGER = Logger.getLogger("Minecraft"); - private final IEssentials ess; - private final IProtect protect; + private final transient IEssentials ess; + private final transient IProtect protect; public EssentialsConnect(final Plugin essPlugin, final Plugin essProtect) { diff --git a/EssentialsProtect/src/net/ess3/protect/EssentialsProtect.java b/EssentialsProtect/src/net/ess3/protect/EssentialsProtect.java index dec2ecd8f..98e0596f2 100644 --- a/EssentialsProtect/src/net/ess3/protect/EssentialsProtect.java +++ b/EssentialsProtect/src/net/ess3/protect/EssentialsProtect.java @@ -11,8 +11,8 @@ import org.bukkit.plugin.java.JavaPlugin; public class EssentialsProtect extends JavaPlugin implements IProtect { private static final Logger LOGGER = Logger.getLogger("Minecraft"); - private EssentialsConnect ess = null; - private ProtectHolder settings = null; + private transient EssentialsConnect ess = null; + private transient ProtectHolder settings = null; @Override public void onEnable() diff --git a/EssentialsProtect/src/net/ess3/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/net/ess3/protect/EssentialsProtectBlockListener.java index 01fc2651b..6446adc44 100644 --- a/EssentialsProtect/src/net/ess3/protect/EssentialsProtectBlockListener.java +++ b/EssentialsProtect/src/net/ess3/protect/EssentialsProtectBlockListener.java @@ -13,7 +13,7 @@ import org.bukkit.event.block.BlockIgniteEvent; public class EssentialsProtectBlockListener implements Listener { - final private IProtect prot; + final private transient IProtect prot; public EssentialsProtectBlockListener(final IProtect parent) { diff --git a/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java index f111c7b78..4fa71139b 100644 --- a/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java +++ b/EssentialsProtect/src/net/ess3/protect/EssentialsProtectEntityListener.java @@ -11,7 +11,7 @@ import org.bukkit.event.entity.EntityTargetEvent.TargetReason; //TODO: remove unnecessary return statements public class EssentialsProtectEntityListener implements Listener { - private final IProtect prot; + private final transient IProtect prot; public EssentialsProtectEntityListener(final IProtect prot) { @@ -47,7 +47,7 @@ public class EssentialsProtectEntityListener implements Listener return; } if (cause == DamageCause.BLOCK_EXPLOSION && (Permissions.PREVENTDAMAGE_TNT.isAuthorized(user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized( - user))) + user))) { event.setCancelled(true); return; @@ -69,21 +69,21 @@ public class EssentialsProtectEntityListener implements Listener //Creeper explode prevention if (eAttack instanceof Creeper && settings.getData().getPrevent().isCreeperExplosion() || (Permissions.PREVENTDAMAGE_CREEPER.isAuthorized( - user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user))) + user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user))) { event.setCancelled(true); return; } if ((event.getEntity() instanceof Fireball || event.getEntity() instanceof SmallFireball) && (Permissions.PREVENTDAMAGE_FIREBALL.isAuthorized( - user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user))) + user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user))) { event.setCancelled(true); return; } if ((event.getEntity() instanceof WitherSkull && Permissions.PREVENTDAMAGE_WITHERSKULL.isAuthorized( - user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user))) + user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user))) { event.setCancelled(true); return; @@ -96,9 +96,9 @@ public class EssentialsProtectEntityListener implements Listener } if (edEvent.getDamager() instanceof Projectile && ((Permissions.PREVENTDAMAGE_PROJECTILES.isAuthorized( - user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized( - user)) || (((Projectile)edEvent.getDamager()).getShooter() instanceof Player && (!Permissions.PVP.isAuthorized( - user) || !Permissions.PVP.isAuthorized((Player)((Projectile)edEvent.getDamager()).getShooter()))))) + user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized( + user)) || (((Projectile)edEvent.getDamager()).getShooter() instanceof Player && (!Permissions.PVP.isAuthorized( + user) || !Permissions.PVP.isAuthorized((Player)((Projectile)edEvent.getDamager()).getShooter()))))) { event.setCancelled(true); return; @@ -115,13 +115,13 @@ public class EssentialsProtectEntityListener implements Listener } if (cause == DamageCause.SUFFOCATION && (Permissions.PREVENTDAMAGE_SUFFOCATION.isAuthorized(user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized( - user))) + user))) { event.setCancelled(true); return; } if ((cause == DamageCause.FIRE || cause == DamageCause.FIRE_TICK) && (Permissions.PREVENTDAMAGE_FIRE.isAuthorized( - user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user))) + user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized(user))) { event.setCancelled(true); return; @@ -132,7 +132,7 @@ public class EssentialsProtectEntityListener implements Listener return; } if (cause == DamageCause.LIGHTNING && (Permissions.PREVENTDAMAGE_LIGHTNING.isAuthorized(user) && !Permissions.PREVENTDAMAGE_NONE.isAuthorized( - user))) + user))) { event.setCancelled(true); } @@ -143,8 +143,7 @@ public class EssentialsProtectEntityListener implements Listener } } } - // return statements are probably not needed here - + // return statements are probably not needed here @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onEntityExplode(final EntityExplodeEvent event) { diff --git a/EssentialsProtect/src/net/ess3/protect/EssentialsProtectWeatherListener.java b/EssentialsProtect/src/net/ess3/protect/EssentialsProtectWeatherListener.java index b20f7b17d..c12dc4a52 100644 --- a/EssentialsProtect/src/net/ess3/protect/EssentialsProtectWeatherListener.java +++ b/EssentialsProtect/src/net/ess3/protect/EssentialsProtectWeatherListener.java @@ -10,7 +10,7 @@ import org.bukkit.event.weather.WeatherChangeEvent; public class EssentialsProtectWeatherListener implements Listener { - private final IProtect prot; + private final transient IProtect prot; public EssentialsProtectWeatherListener(final IProtect prot) { diff --git a/EssentialsProtect/src/net/ess3/protect/Permissions.java b/EssentialsProtect/src/net/ess3/protect/Permissions.java index 3655924cd..7cacd741f 100644 --- a/EssentialsProtect/src/net/ess3/protect/Permissions.java +++ b/EssentialsProtect/src/net/ess3/protect/Permissions.java @@ -29,7 +29,7 @@ public enum Permissions implements IPermission private static final String base = "essentials.protect."; private final String permission; private final PermissionDefault defaultPerm; - private String parent = null; + private transient String parent = null; private Permissions() { @@ -72,5 +72,6 @@ public enum Permissions implements IPermission { return PermissionFactory.checkPermission(sender, this); } + public static DotStarPermission ENTITY_TARGET_BYPASS = new DotStarPermission("essentials.protect.entitytarget.bypass"); } |