mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-03 14:38:46 +00:00
Updated the whole plugin to 1.9, killaura check does not work in 1.8
from now on.
This commit is contained in:
1 parent
6fa3f4c8df
commit
37180450ce
7 files changed
+24
-42
No files matched your search
@@ -19,11 +19,6 @@
|
|||||||
<id>dmulloy2-repo</id>
|
<id>dmulloy2-repo</id>
|
||||||
<url>http://repo.dmulloy2.net/content/groups/public/</url>
|
<url>http://repo.dmulloy2.net/content/groups/public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<!-- And so on -->
|
|
||||||
<repository>
|
|
||||||
<id>gravity-repo</id>
|
|
||||||
<url>http://repo.gravitydevelopment.net</url>
|
|
||||||
</repository>
|
|
||||||
</repositories>
|
</repositories>
|
||||||
<build>
|
<build>
|
||||||
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
|
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
|
||||||
@@ -90,15 +85,9 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bukkit</groupId>
|
<groupId>org.bukkit</groupId>
|
||||||
<artifactId>craftbukkit</artifactId>
|
<artifactId>craftbukkit</artifactId>
|
||||||
<version>1.8.8-R0.1-SNAPSHOT</version>
|
<version>1.9.2-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>net.gravitydevelopment.updater</groupId>
|
|
||||||
<artifactId>updater</artifactId>
|
|
||||||
<version>2.1</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.comphenix.protocol</groupId>
|
<groupId>com.comphenix.protocol</groupId>
|
||||||
<artifactId>ProtocolLib-API</artifactId>
|
<artifactId>ProtocolLib-API</artifactId>
|
||||||
|
|||||||
@@ -18,14 +18,12 @@
|
|||||||
|
|
||||||
package net.gravitydevelopment.anticheat;
|
package net.gravitydevelopment.anticheat;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import com.comphenix.protocol.ProtocolLibrary;
|
import com.comphenix.protocol.ProtocolLibrary;
|
||||||
@@ -43,7 +41,6 @@ import net.gravitydevelopment.anticheat.event.VehicleListener;
|
|||||||
import net.gravitydevelopment.anticheat.manage.AntiCheatManager;
|
import net.gravitydevelopment.anticheat.manage.AntiCheatManager;
|
||||||
import net.gravitydevelopment.anticheat.util.User;
|
import net.gravitydevelopment.anticheat.util.User;
|
||||||
import net.gravitydevelopment.anticheat.util.VersionUtil;
|
import net.gravitydevelopment.anticheat.util.VersionUtil;
|
||||||
import net.gravitydevelopment.updater.Updater;
|
|
||||||
|
|
||||||
public class AntiCheat extends JavaPlugin {
|
public class AntiCheat extends JavaPlugin {
|
||||||
|
|
||||||
@@ -95,7 +92,7 @@ public class AntiCheat extends JavaPlugin {
|
|||||||
getLogger().info("Running version " + VersionUtil.getVersion() + "...");
|
getLogger().info("Running version " + VersionUtil.getVersion() + "...");
|
||||||
|
|
||||||
// Enable packetlisteners
|
// Enable packetlisteners
|
||||||
if (VersionUtil.getVersion().equals("v1_8_R3"))
|
if (VersionUtil.getVersion().equals("v1_9_R1"))
|
||||||
KillAuraCheck.listenPackets();
|
KillAuraCheck.listenPackets();
|
||||||
|
|
||||||
BlinkCheck.startTimer();
|
BlinkCheck.startTimer();
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class KillAuraCheck {
|
|||||||
public static void doDamageEvent(EntityDamageByEntityEvent e, Player p) {
|
public static void doDamageEvent(EntityDamageByEntityEvent e, Player p) {
|
||||||
if (AntiCheat.getManager().getCheckManager().isOpExempt(p) || AntiCheat.getManager().getCheckManager().isExempt(p, CheckType.KILLAURA))
|
if (AntiCheat.getManager().getCheckManager().isOpExempt(p) || AntiCheat.getManager().getCheckManager().isExempt(p, CheckType.KILLAURA))
|
||||||
return;
|
return;
|
||||||
if (VersionUtil.getVersion().equals("v1_8_R3")) { // TODO 1.9 support
|
if (VersionUtil.getVersion().equals("v1_9_R1")) { // TODO 1.9 R2 support
|
||||||
if (!CHECKER_NPCS.containsKey(p.getUniqueId())) { // Enable killaura check after player damaged other player, this is more efficient
|
if (!CHECKER_NPCS.containsKey(p.getUniqueId())) { // Enable killaura check after player damaged other player, this is more efficient
|
||||||
CHECKER_NPCS.put(p.getUniqueId(), new CheckerNPCS(p));
|
CHECKER_NPCS.put(p.getUniqueId(), new CheckerNPCS(p));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.CraftServer;
|
import org.bukkit.craftbukkit.v1_9_R1.CraftServer;
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.CraftWorld;
|
import org.bukkit.craftbukkit.v1_9_R1.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_9_R1.entity.CraftPlayer;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
|
|
||||||
import net.minecraft.server.v1_8_R3.EntityPlayer;
|
import net.minecraft.server.v1_9_R1.EntityPlayer;
|
||||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityDestroy;
|
import net.minecraft.server.v1_9_R1.PacketPlayOutEntityDestroy;
|
||||||
import net.minecraft.server.v1_8_R3.PacketPlayOutEntityTeleport;
|
import net.minecraft.server.v1_9_R1.PacketPlayOutEntityTeleport;
|
||||||
import net.minecraft.server.v1_8_R3.PacketPlayOutNamedEntitySpawn;
|
import net.minecraft.server.v1_9_R1.PacketPlayOutNamedEntitySpawn;
|
||||||
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo;
|
import net.minecraft.server.v1_9_R1.PacketPlayOutPlayerInfo;
|
||||||
import net.minecraft.server.v1_8_R3.PlayerInteractManager;
|
import net.minecraft.server.v1_9_R1.PlayerInteractManager;
|
||||||
|
|
||||||
public class NPC {
|
public class NPC {
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class VersionUtil {
|
|||||||
if (getVersion().equals("v1_8_R3")) {
|
if (getVersion().equals("v1_8_R3")) {
|
||||||
return p.isFlying();
|
return p.isFlying();
|
||||||
}else if (getVersion().equals("v1_9_R1")) {
|
}else if (getVersion().equals("v1_9_R1")) {
|
||||||
return p.isFlying() || ElytraUtil_R1.isGliding(p);
|
return p.isFlying() || ElytraUtil.isGliding(p);
|
||||||
}else {
|
}else {
|
||||||
return p.isFlying();
|
return p.isFlying();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user