summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src/com/earth2me
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-07-16 17:04:25 +0200
committersnowleo <schneeleo@gmail.com>2011-07-16 17:04:25 +0200
commit48230f615d0d3a6f3d98d03960ccf71c337f914a (patch)
treeccaedabafacacb1e757653a3f31343e0a589acca /EssentialsProtect/src/com/earth2me
parent088f50ce8ae6d3b75392526cff929c3c8aed928a (diff)
downloadEssentials-48230f615d0d3a6f3d98d03960ccf71c337f914a.tar
Essentials-48230f615d0d3a6f3d98d03960ccf71c337f914a.tar.gz
Essentials-48230f615d0d3a6f3d98d03960ccf71c337f914a.tar.lz
Essentials-48230f615d0d3a6f3d98d03960ccf71c337f914a.tar.xz
Essentials-48230f615d0d3a6f3d98d03960ccf71c337f914a.zip
Fixes to EssentialsProtect that will remove conflicts with WorldGuard and other protection plugins.
Diffstat (limited to 'EssentialsProtect/src/com/earth2me')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java8
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java4
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java4
3 files changed, 16 insertions, 0 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
index 8bc26f67e..1b9736a5a 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java
@@ -97,6 +97,10 @@ public class EssentialsProtectBlockListener extends BlockListener
@Override
public void onBlockIgnite(BlockIgniteEvent event)
{
+ if (event.isCancelled())
+ {
+ return;
+ }
Block block = event.getBlock();
if (block.getType() == Material.RAILS
&& prot.getSettingBool(ProtectConfig.protect_rails))
@@ -185,6 +189,10 @@ public class EssentialsProtectBlockListener extends BlockListener
@Override
public void onBlockBurn(final BlockBurnEvent event)
{
+ if (event.isCancelled())
+ {
+ return;
+ }
final Block block = event.getBlock();
if (block.getType() == Material.RAILS && prot.getSettingBool(ProtectConfig.protect_rails))
{
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
index f8166b1d5..defbde243 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java
@@ -292,6 +292,10 @@ public class EssentialsProtectEntityListener extends EntityListener
@Override
public void onEntityTarget(final EntityTargetEvent event)
{
+ if (event.isCancelled())
+ {
+ return;
+ }
if (!(event.getTarget() instanceof Player))
{
return;
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
index a2209a46a..aefb6bfe6 100644
--- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
+++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java
@@ -24,6 +24,10 @@ public class EssentialsProtectPlayerListener extends PlayerListener
@Override
public void onPlayerInteract(final PlayerInteractEvent event)
{
+ if (event.isCancelled())
+ {
+ return;
+ }
final User user = ess.getUser(event.getPlayer());
if (prot.getSettingBool(ProtectConfig.disable_build) && !user.canBuild())