Updated the whole plugin to 1.9, killaura check does not work in 1.8

from now on.
This commit is contained in:
Rammelkast committed 2016-06-05 13:48:26 +02:00
1 parent 6fa3f4c8df
commit 37180450ce
7 files changed
+24 -42

No files matched your search

@@ -0,0 +1,11 @@
package net.gravitydevelopment.anticheat.util;
import org.bukkit.entity.Player;
public class ElytraUtil {
public static boolean isGliding(Player p) {
return p.isGliding();
}
}
@@ -1,15 +0,0 @@
package net.gravitydevelopment.anticheat.util;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_9_R1.EntityPlayer;
public class ElytraUtil_R1 {
public static boolean isGliding(Player p) {
EntityPlayer player = ((CraftPlayer)p).getHandle();
return player.cB();
}
}
@@ -5,20 +5,20 @@ import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
import org.bukkit.craftbukkit.v1_9_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_8_R3.EntityPlayer;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_8_R3.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_8_R3.PlayerInteractManager;
import net.minecraft.server.v1_9_R1.EntityPlayer;
import net.minecraft.server.v1_9_R1.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_9_R1.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_9_R1.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_9_R1.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_9_R1.PlayerInteractManager;
public class NPC {
@@ -17,7 +17,7 @@ public class VersionUtil {
if (getVersion().equals("v1_8_R3")) {
return p.isFlying();
}else if (getVersion().equals("v1_9_R1")) {
return p.isFlying() || ElytraUtil_R1.isGliding(p);
return p.isFlying() || ElytraUtil.isGliding(p);
}else {
return p.isFlying();
}