Fix broken IllegalInteract permission, fix false positive in sneak check

This commit is contained in:
Rammelkast committed 2020-06-09 14:05:32 +02:00
1 parent 992c67d894
commit db9aa97ca1
3 files changed
+4 -3

No files matched your search

@@ -30,6 +30,7 @@ import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.player.PlayerToggleSprintEvent;
@@ -306,7 +307,7 @@ public class Backend {
public CheckResult checkSneak(Player player, Location location, double x, double z) {
if (player.isSneaking() && !VersionUtil.isFlying(player) && !isMovingExempt(player) && !player.isInsideVehicle()
&& !Utilities.cantStandAtExp(location)) {
&& !Utilities.cantStandAtExp(location) && !Utilities.isSlab(location.getBlock().getRelative(BlockFace.DOWN))) {
double i = x > magic.XZ_SPEED_MAX_SNEAK() ? x : z > magic.XZ_SPEED_MAX_SNEAK() ? z : -1;
if (i != -1) {
if (this.fastSneakViolations.containsKey(player.getUniqueId())) {