summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src
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
commita710cd2a950d7f4e0d7f89260d2dab4349e7f30a (patch)
treeb529d263f8d681b27002dd7d21944f45dd316809 /EssentialsProtect/src
parentee92e48eb3cf9dc37845c236557dc0e698b82704 (diff)
downloadEssentials-a710cd2a950d7f4e0d7f89260d2dab4349e7f30a.tar
Essentials-a710cd2a950d7f4e0d7f89260d2dab4349e7f30a.tar.gz
Essentials-a710cd2a950d7f4e0d7f89260d2dab4349e7f30a.tar.lz
Essentials-a710cd2a950d7f4e0d7f89260d2dab4349e7f30a.tar.xz
Essentials-a710cd2a950d7f4e0d7f89260d2dab4349e7f30a.zip
Fixes to EssentialsProtect that will remove conflicts with WorldGuard and other protection plugins.
Diffstat (limited to 'EssentialsProtect/src')
-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())