mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Fixed false positives with boats, changes to MorePackets
This commit is contained in:
1 parent
db9aa97ca1
commit
610d53550f
6 files changed
+32
-4
No files matched your search
@@ -31,6 +31,8 @@ import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Boat;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.NumberConversions;
|
||||
@@ -121,6 +123,14 @@ public final class Utilities {
|
||||
&& !isSlime(block.getRelative(BlockFace.SOUTH)) && !isSlime(block.getRelative(BlockFace.WEST)) && !isSlime(block.getRelative(BlockFace.DOWN));
|
||||
}
|
||||
|
||||
public static boolean couldBeOnBoat(Player player) {
|
||||
for (Entity entity : player.getNearbyEntities(0.25, 0.25, 0.25)) {
|
||||
if (entity instanceof Boat)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether a player is fully submerged in water
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user