mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
Fix #145, update libraries
This commit is contained in:
1 parent
33bc8bb7fa
commit
f637facbea
3 files changed
+746
-718
No files matched your search
@@ -23,15 +23,16 @@ import java.util.HashMap;
|
|||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
|
|
||||||
import com.rammelkast.anticheatreloaded.AntiCheatReloaded;
|
import com.rammelkast.anticheatreloaded.AntiCheatReloaded;
|
||||||
import com.rammelkast.anticheatreloaded.check.CheckResult;
|
import com.rammelkast.anticheatreloaded.check.CheckResult;
|
||||||
import com.rammelkast.anticheatreloaded.util.Distance;
|
import com.rammelkast.anticheatreloaded.util.Distance;
|
||||||
|
import com.rammelkast.anticheatreloaded.util.MinecraftVersion;
|
||||||
import com.rammelkast.anticheatreloaded.util.Utilities;
|
import com.rammelkast.anticheatreloaded.util.Utilities;
|
||||||
import com.rammelkast.anticheatreloaded.util.VersionUtil;
|
import com.rammelkast.anticheatreloaded.util.VersionUtil;
|
||||||
|
import com.rammelkast.anticheatreloaded.util.XMaterial;
|
||||||
|
|
||||||
public class ElytraCheck {
|
public class ElytraCheck {
|
||||||
|
|
||||||
@@ -57,13 +58,16 @@ public class ElytraCheck {
|
|||||||
|
|
||||||
double changeY = distance.toY() - distance.fromY();
|
double changeY = distance.toY() - distance.fromY();
|
||||||
boolean upwardMovement = changeY > 0;
|
boolean upwardMovement = changeY > 0;
|
||||||
if (player.getInventory().getItemInMainHand().getType() == Material.TRIDENT) {
|
if (MinecraftVersion.getCurrentVersion().isAtLeast(MinecraftVersion.AQUATIC_UPDATE)) {
|
||||||
|
// Tident added in 1.13
|
||||||
|
if (player.getInventory().getItemInMainHand().getType() == XMaterial.TRIDENT.parseMaterial()) {
|
||||||
if (upwardMovement) {
|
if (upwardMovement) {
|
||||||
// TODO continue check here
|
// TODO continue check here
|
||||||
JUMP_Y_VALUE.remove(uuid);
|
JUMP_Y_VALUE.remove(uuid);
|
||||||
return PASS;
|
return PASS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (changeY == 0.0D) {
|
if (changeY == 0.0D) {
|
||||||
// Seen no false positives here yet
|
// Seen no false positives here yet
|
||||||
|
|||||||
@@ -45,6 +45,11 @@ public class MinecraftVersion implements Comparable<MinecraftVersion>, Serializa
|
|||||||
*/
|
*/
|
||||||
private static final Pattern VERSION_PATTERN = Pattern.compile(".*\\(.*MC.\\s*([a-zA-z0-9\\-.]+).*");
|
private static final Pattern VERSION_PATTERN = Pattern.compile(".*\\(.*MC.\\s*([a-zA-z0-9\\-.]+).*");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Version 1.17 - caves and cliffs part 1
|
||||||
|
*/
|
||||||
|
public static final MinecraftVersion CAVES_CLIFFS_1 = new MinecraftVersion("1.17");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Version 1.16.2 - breaking change to the nether update
|
* Version 1.16.2 - breaking change to the nether update
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user