Fix #145, update libraries

This commit is contained in:
Rammelkast committed 2021-06-20 20:40:43 +02:00
1 parent 33bc8bb7fa
commit f637facbea
3 files changed
+748 -720

No files matched your search

@@ -23,15 +23,16 @@ import java.util.HashMap;
import java.util.UUID;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffectType;
import com.rammelkast.anticheatreloaded.AntiCheatReloaded;
import com.rammelkast.anticheatreloaded.check.CheckResult;
import com.rammelkast.anticheatreloaded.util.Distance;
import com.rammelkast.anticheatreloaded.util.MinecraftVersion;
import com.rammelkast.anticheatreloaded.util.Utilities;
import com.rammelkast.anticheatreloaded.util.VersionUtil;
import com.rammelkast.anticheatreloaded.util.XMaterial;
public class ElytraCheck {
@@ -57,11 +58,14 @@ public class ElytraCheck {
double changeY = distance.toY() - distance.fromY();
boolean upwardMovement = changeY > 0;
if (player.getInventory().getItemInMainHand().getType() == Material.TRIDENT) {
if (upwardMovement) {
// TODO continue check here
JUMP_Y_VALUE.remove(uuid);
return PASS;
if (MinecraftVersion.getCurrentVersion().isAtLeast(MinecraftVersion.AQUATIC_UPDATE)) {
// Tident added in 1.13
if (player.getInventory().getItemInMainHand().getType() == XMaterial.TRIDENT.parseMaterial()) {
if (upwardMovement) {
// TODO continue check here
JUMP_Y_VALUE.remove(uuid);
return PASS;
}
}
}
@@ -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\\-.]+).*");
/**
* 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
*/
File diff suppressed because it is too large. Load diff