mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 01:27:40 +01:00
Fixes to EssentialsProtect that will remove conflicts with WorldGuard and other protection plugins.
This commit is contained in:
parent
088f50ce8a
commit
48230f615d
@ -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))
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user