Fixed Elytra issues for 1_9_R1, still not able to find .isGliding() in

R2?
This commit is contained in:
Rammelkast committed 2016-06-05 13:37:16 +02:00
1 parent fcc75800d2
commit 6fa3f4c8df
3 files changed
+29 -2

No files matched your search

@@ -1,6 +1,7 @@
package net.gravitydevelopment.anticheat.util;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
public class VersionUtil {
@@ -12,4 +13,14 @@ public class VersionUtil {
return version;
}
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_R1.isGliding(p);
}else {
return p.isFlying();
}
}
}