mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 09:37:50 +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
|
@Override
|
||||||
public void onBlockIgnite(BlockIgniteEvent event)
|
public void onBlockIgnite(BlockIgniteEvent event)
|
||||||
{
|
{
|
||||||
|
if (event.isCancelled())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
Block block = event.getBlock();
|
Block block = event.getBlock();
|
||||||
if (block.getType() == Material.RAILS
|
if (block.getType() == Material.RAILS
|
||||||
&& prot.getSettingBool(ProtectConfig.protect_rails))
|
&& prot.getSettingBool(ProtectConfig.protect_rails))
|
||||||
@ -185,6 +189,10 @@ public class EssentialsProtectBlockListener extends BlockListener
|
|||||||
@Override
|
@Override
|
||||||
public void onBlockBurn(final BlockBurnEvent event)
|
public void onBlockBurn(final BlockBurnEvent event)
|
||||||
{
|
{
|
||||||
|
if (event.isCancelled())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
final Block block = event.getBlock();
|
final Block block = event.getBlock();
|
||||||
if (block.getType() == Material.RAILS && prot.getSettingBool(ProtectConfig.protect_rails))
|
if (block.getType() == Material.RAILS && prot.getSettingBool(ProtectConfig.protect_rails))
|
||||||
{
|
{
|
||||||
|
@ -292,6 +292,10 @@ public class EssentialsProtectEntityListener extends EntityListener
|
|||||||
@Override
|
@Override
|
||||||
public void onEntityTarget(final EntityTargetEvent event)
|
public void onEntityTarget(final EntityTargetEvent event)
|
||||||
{
|
{
|
||||||
|
if (event.isCancelled())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!(event.getTarget() instanceof Player))
|
if (!(event.getTarget() instanceof Player))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -24,6 +24,10 @@ public class EssentialsProtectPlayerListener extends PlayerListener
|
|||||||
@Override
|
@Override
|
||||||
public void onPlayerInteract(final PlayerInteractEvent event)
|
public void onPlayerInteract(final PlayerInteractEvent event)
|
||||||
{
|
{
|
||||||
|
if (event.isCancelled())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
final User user = ess.getUser(event.getPlayer());
|
final User user = ess.getUser(event.getPlayer());
|
||||||
|
|
||||||
if (prot.getSettingBool(ProtectConfig.disable_build) && !user.canBuild())
|
if (prot.getSettingBool(ProtectConfig.disable_build) && !user.canBuild())
|
||||||
|
Loading…
Reference in New Issue
Block a user