KillAura check will only be 1.8.x right now

This commit is contained in:
Rammelkast committed 2016-05-29 13:30:17 +02:00
1 parent 1b14a70526
commit 4d2330eebf
3 files changed
+3 -39

No files matched your search

@@ -4,10 +4,8 @@ import java.util.ArrayList;
import java.util.List;
public class CheckerNPCS {
private List<NPC_1_9_R1> ONE_DOT_NINE_NPCS = new ArrayList<NPC_1_9_R1>();
private List<NPC_1_8_R3> ONE_DOT_EIGHT_NPCS = new ArrayList<NPC_1_8_R3>();
private List<NPC> NPCS = new ArrayList<NPC>();
}
@@ -17,11 +17,11 @@ import net.minecraft.server.v1_8_R3.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_8_R3.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_8_R3.PlayerInteractManager;
public class NPC_1_8_R3 {
public class NPC {
private final EntityPlayer npc;
public NPC_1_8_R3(String name, World w, Player owner) {
public NPC(String name, World w, Player owner) {
this.npc = new EntityPlayer(((CraftServer) Bukkit.getServer()).getServer(), ((CraftWorld) w).getHandle(), new GameProfile(UUID.randomUUID(), name), new PlayerInteractManager(((CraftWorld) w).getHandle()));
((CraftPlayer)owner).getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{this.npc}));
((CraftPlayer)owner).getHandle().playerConnection.sendPacket(new PacketPlayOutNamedEntitySpawn(this.npc));
@@ -1,34 +0,0 @@
package net.gravitydevelopment.anticheat.util;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
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 com.mojang.authlib.GameProfile;
import net.minecraft.server.v1_9_R1.EntityPlayer;
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_1_9_R1 {
private final EntityPlayer npc;
public NPC_1_9_R1(String name, World w, Player owner) {
this.npc = new EntityPlayer(((CraftServer) Bukkit.getServer()).getServer(), ((CraftWorld) w).getHandle(), new GameProfile(UUID.randomUUID(), name), new PlayerInteractManager(((CraftWorld) w).getHandle()));
((CraftPlayer)owner).getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{this.npc}));
((CraftPlayer)owner).getHandle().playerConnection.sendPacket(new PacketPlayOutNamedEntitySpawn(this.npc));
}
public void teleport(Location loc) {
this.npc.teleportTo(loc, false);
}
}