Fixes to EssentialsProtect that will remove conflicts with WorldGuard and other protection plugins.

This commit is contained in:
snowleo 2011-07-16 17:04:25 +02:00
parent 088f50ce8a
commit 48230f615d
3 changed files with 16 additions and 0 deletions

View File

@ -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))
{

View File

@ -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;

View File

@ -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())