mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-04 06:28:52 +00:00
Same fix for block breaking, and forgot to ignore long grass for fastbreak.
This commit is contained in:
1 parent
f66db829f7
commit
cea645b3c5
1 file changed
+32
-28
@@ -65,37 +65,41 @@ public class BlockListener implements Listener {
|
|||||||
tracker.decreaseLevel(player);
|
tracker.decreaseLevel(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!player.hasPermission("anticheat.fastbreak") && !player.getInventory().getItemInHand().containsEnchantment(Enchantment.DIG_SPEED))
|
if (!player.hasPermission("anticheat.fastbreak"))
|
||||||
{
|
{
|
||||||
if(block.getType() != Material.RED_MUSHROOM
|
if(!player.getInventory().getItemInHand().containsEnchantment(Enchantment.DIG_SPEED))
|
||||||
&& block.getType() != Material.RED_ROSE
|
|
||||||
&& block.getType() != Material.BROWN_MUSHROOM
|
|
||||||
&& block.getType() != Material.YELLOW_FLOWER
|
|
||||||
&& block.getType() != Material.REDSTONE
|
|
||||||
&& block.getType() != Material.REDSTONE_TORCH_OFF
|
|
||||||
&& block.getType() != Material.REDSTONE_TORCH_ON
|
|
||||||
&& block.getType() != Material.REDSTONE_WIRE
|
|
||||||
&& block.getType() != Material.GRASS
|
|
||||||
&& block.getType() != Material.PAINTING
|
|
||||||
&& block.getType() != Material.WHEAT
|
|
||||||
&& block.getType() != Material.SUGAR_CANE
|
|
||||||
&& block.getType() != Material.SUGAR_CANE_BLOCK
|
|
||||||
&& block.getType() != Material.DIODE
|
|
||||||
&& block.getType() != Material.DIODE_BLOCK_OFF
|
|
||||||
&& block.getType() != Material.DIODE_BLOCK_ON
|
|
||||||
&& block.getType() != Material.SAPLING
|
|
||||||
&& block.getType() != Material.TORCH
|
|
||||||
&& block.getType() != Material.SNOW)
|
|
||||||
{
|
{
|
||||||
if (!blm.justBroke(player))
|
if(block.getType() != Material.RED_MUSHROOM
|
||||||
|
&& block.getType() != Material.RED_ROSE
|
||||||
|
&& block.getType() != Material.BROWN_MUSHROOM
|
||||||
|
&& block.getType() != Material.YELLOW_FLOWER
|
||||||
|
&& block.getType() != Material.REDSTONE
|
||||||
|
&& block.getType() != Material.REDSTONE_TORCH_OFF
|
||||||
|
&& block.getType() != Material.REDSTONE_TORCH_ON
|
||||||
|
&& block.getType() != Material.REDSTONE_WIRE
|
||||||
|
&& block.getType() != Material.GRASS
|
||||||
|
&& block.getType() != Material.LONG_GRASS
|
||||||
|
&& block.getType() != Material.PAINTING
|
||||||
|
&& block.getType() != Material.WHEAT
|
||||||
|
&& block.getType() != Material.SUGAR_CANE
|
||||||
|
&& block.getType() != Material.SUGAR_CANE_BLOCK
|
||||||
|
&& block.getType() != Material.DIODE
|
||||||
|
&& block.getType() != Material.DIODE_BLOCK_OFF
|
||||||
|
&& block.getType() != Material.DIODE_BLOCK_ON
|
||||||
|
&& block.getType() != Material.SAPLING
|
||||||
|
&& block.getType() != Material.TORCH
|
||||||
|
&& block.getType() != Material.SNOW)
|
||||||
{
|
{
|
||||||
blm.logBreak(player);
|
if (!blm.justBroke(player))
|
||||||
}
|
{
|
||||||
else
|
blm.logBreak(player);
|
||||||
{
|
}
|
||||||
plugin.log(player.getName() + " tried to break a block too fast!");
|
else
|
||||||
tracker.increaseLevel(player, 2);
|
{
|
||||||
event.setCancelled(true);
|
plugin.log(player.getName() + " tried to break a block too fast!");
|
||||||
|
tracker.increaseLevel(player, 2);
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user