mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-01 14:38:56 +00:00
1.10 updates
This commit is contained in:
1 parent
cf36228285
commit
761eb2fe82
4 files changed
+5
-21
No files matched your search
@@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.gravitydevelopment.anticheat</groupId>
|
||||
<artifactId>AntiCheat</artifactId>
|
||||
<version>1.3.1-ALPHA</version>
|
||||
<version>1.4.0-ALPHA</version>
|
||||
<name>AntiCheatReloaded</name>
|
||||
<url>https://rammelkast.com</url>
|
||||
<properties>
|
||||
|
||||
@@ -105,7 +105,8 @@ public class YAxisCheck {
|
||||
Material.SANDSTONE_STAIRS,
|
||||
Material.SMOOTH_STAIRS,
|
||||
Material.SPRUCE_WOOD_STAIRS,
|
||||
Material.WOOD_STAIRS
|
||||
Material.WOOD_STAIRS,
|
||||
Material.PURPUR_STAIRS
|
||||
);
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package net.gravitydevelopment.anticheat.util;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
public class ElytraUtil {
|
||||
|
||||
public static boolean isGliding(Player p) {
|
||||
return p.isGliding();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,20 +6,14 @@ import org.bukkit.entity.Player;
|
||||
public class VersionUtil {
|
||||
|
||||
public static String getVersion() {
|
||||
String version = "";
|
||||
try {
|
||||
version = Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3];
|
||||
} catch (ArrayIndexOutOfBoundsException whatVersionAreYouUsingException) {}
|
||||
return version;
|
||||
return Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3];
|
||||
}
|
||||
|
||||
public static boolean isFlying(Player p) {
|
||||
if (getVersion().equals("v1_8_R3")) {
|
||||
return p.isFlying();
|
||||
}else if (getVersion().equals("v1_9_R1")) {
|
||||
return p.isFlying() || ElytraUtil.isGliding(p);
|
||||
}else {
|
||||
return p.isFlying();
|
||||
return p.isFlying() || p.isGliding();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user