More work on 1.8 update

This commit is contained in:
Shaun Bennett 2015-04-23 08:28:19 -04:00
parent 20b5ee8b65
commit ed0db983f8
24 changed files with 306 additions and 305 deletions

View File

@ -1,8 +1,8 @@
package mineplex.core.common;
import net.minecraft.server.v1_7_R4.Entity;
import net.minecraft.server.v1_7_R4.NBTTagCompound;
import net.minecraft.server.v1_7_R4.World;
import net.minecraft.server.v1_8_R2.Entity;
import net.minecraft.server.v1_8_R2.NBTTagCompound;
import net.minecraft.server.v1_8_R2.World;
public class DummyEntity extends Entity
{
@ -12,17 +12,20 @@ public class DummyEntity extends Entity
}
@Override
protected void c()
protected void h()
{
}
@Override
protected void a(NBTTagCompound nbttagcompound)
protected void a(NBTTagCompound nbtTagCompound)
{
}
@Override
protected void b(NBTTagCompound nbttagcompound)
protected void b(NBTTagCompound nbtTagCompound)
{
}
}

View File

@ -2,7 +2,7 @@ package mineplex.core.common.util;
import java.util.HashMap;
import org.bukkit.craftbukkit.v1_7_R4.inventory.CraftInventory;
import org.bukkit.craftbukkit.v1_8_R2.inventory.CraftInventory;
import org.bukkit.inventory.ItemStack;
public class InventoryUtil

View File

@ -1,48 +1,40 @@
package mineplex.core.common.util;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import net.minecraft.server.v1_7_R4.Block;
import net.minecraft.server.v1_7_R4.BlockContainer;
import net.minecraft.server.v1_7_R4.Blocks;
import net.minecraft.server.v1_7_R4.ChunkCoordIntPair;
import net.minecraft.server.v1_7_R4.ChunkSection;
import net.minecraft.server.v1_7_R4.EnumSkyBlock;
import net.minecraft.server.v1_7_R4.ExceptionWorldConflict;
import net.minecraft.server.v1_7_R4.IContainer;
import net.minecraft.server.v1_7_R4.IProgressUpdate;
import net.minecraft.server.v1_7_R4.MinecraftServer;
import net.minecraft.server.v1_7_R4.PacketPlayOutMapChunkBulk;
import net.minecraft.server.v1_7_R4.PacketPlayOutMultiBlockChange;
import net.minecraft.server.v1_7_R4.RegionFile;
import net.minecraft.server.v1_7_R4.RegionFileCache;
import net.minecraft.server.v1_7_R4.TileEntity;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_7_R4.CraftChunk;
import org.bukkit.craftbukkit.v1_7_R4.CraftServer;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R2.CraftChunk;
import org.bukkit.craftbukkit.v1_8_R2.CraftServer;
import org.bukkit.craftbukkit.v1_8_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R2.util.CraftMagicNumbers;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.world.WorldUnloadEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.util.Vector;
import net.minecraft.server.v1_8_R2.Block;
import net.minecraft.server.v1_8_R2.BlockPosition;
import net.minecraft.server.v1_8_R2.ChunkCoordIntPair;
import net.minecraft.server.v1_8_R2.ExceptionWorldConflict;
import net.minecraft.server.v1_8_R2.IBlockData;
import net.minecraft.server.v1_8_R2.IProgressUpdate;
import net.minecraft.server.v1_8_R2.MinecraftServer;
import net.minecraft.server.v1_8_R2.PacketPlayOutMultiBlockChange;
import net.minecraft.server.v1_8_R2.RegionFile;
import net.minecraft.server.v1_8_R2.RegionFileCache;
public class MapUtil
{
public static void ReplaceOreInChunk(Chunk chunk, Material replacee, Material replacer)
/*public static void ReplaceOreInChunk(Chunk chunk, Material replacee, Material replacer)
{
net.minecraft.server.v1_7_R4.Chunk c = ((CraftChunk) chunk).getHandle();
net.minecraft.server.v1_8_R2.Chunk c = ((CraftChunk) chunk).getHandle();
for (int x = 0; x < 16; x++)
{
@ -54,7 +46,7 @@ public class MapUtil
int bY = y & 0xFF;
int bZ = c.locZ << 4 | z & 0xF;
if (c.getType(bX & 0xF, bY, bZ & 0xF).k() == replacee.getId())
if (c.getTypeAbs(bX, bY, bZ).k() == replacee.getId())
{
c.b(bX & 0xF, bY, bZ & 0xF, replacer.getId());
}
@ -63,7 +55,7 @@ public class MapUtil
}
c.initLighting();
}
}*/
public static void QuickChangeBlockAt(Location location, Material setTo)
{
@ -89,10 +81,12 @@ public class MapUtil
public static void QuickChangeBlockAt(World world, int x, int y, int z, int id, int data)
{
Chunk chunk = world.getChunkAt(x >> 4, z >> 4);
net.minecraft.server.v1_7_R4.Chunk c = ((CraftChunk) chunk).getHandle();
net.minecraft.server.v1_8_R2.Chunk c = ((CraftChunk) chunk).getHandle();
c.a(x & 0xF, y, z & 0xF, Block.getById(id), data);
((CraftWorld) world).getHandle().notify(x, y, z);
//c.a(x & 0xF, y, z & 0xF, Block.getById(id), data);
IBlockData blockData = CraftMagicNumbers.getBlock(id).fromLegacyData(data);
c.a(bp(x, y, z), blockData);
((CraftWorld) world).getHandle().notify(bp(x, y, z));
}
public static int GetHighestBlockInCircleAt(World world, int bx, int bz, int radius)
@ -147,7 +141,7 @@ public class MapUtil
Block.getById(id), data))
{
if (notifyPlayers)
((CraftWorld) world).getHandle().notify(x, y, z);
((CraftWorld) world).getHandle().notify(bp(x, y, z));
}
}
@ -156,13 +150,15 @@ public class MapUtil
world.getBlockAt(x, y, z).setTypeIdAndData(id, data, notifyPlayers);
}
private static boolean changeChunkBlock(int x, int y, int z, net.minecraft.server.v1_7_R4.Chunk chunk, Block block,
private static boolean changeChunkBlock(int x, int y, int z, net.minecraft.server.v1_8_R2.Chunk chunk, Block block,
byte data)
{
return chunk.a(x, y, z, block, data);
chunk.a(bp(x, y, z), block.fromLegacyData(data));
return true; // todo?
// return chunk.a(x, y, z, block, data);
}
public static void SendChunkForPlayer(net.minecraft.server.v1_7_R4.Chunk chunk, Player player)
public static void SendChunkForPlayer(net.minecraft.server.v1_8_R2.Chunk chunk, Player player)
{
SendChunkForPlayer(chunk.locX, chunk.locZ, player);
}
@ -211,7 +207,7 @@ public class MapUtil
Bukkit.getPluginManager().callEvent(new WorldUnloadEvent(((CraftWorld) world).getHandle().getWorld()));
Iterator<net.minecraft.server.v1_7_R4.Chunk> chunkIterator = ((CraftWorld) world).getHandle().chunkProviderServer.chunks
Iterator<net.minecraft.server.v1_8_R2.Chunk> chunkIterator = ((CraftWorld) world).getHandle().chunkProviderServer.chunks
.values().iterator();
for (Entity entity : world.getEntities())
@ -221,7 +217,7 @@ public class MapUtil
while (chunkIterator.hasNext())
{
net.minecraft.server.v1_7_R4.Chunk chunk = chunkIterator.next();
net.minecraft.server.v1_8_R2.Chunk chunk = chunkIterator.next();
chunk.removeEntities();
}
@ -298,4 +294,9 @@ public class MapUtil
return true;
}
public static BlockPosition bp(int x, int y, int z)
{
return new BlockPosition(x, y, z);
}
}

View File

@ -6,8 +6,8 @@ import java.util.Scanner;
import java.util.UUID;
import java.util.logging.Level;
import net.minecraft.util.com.mojang.authlib.GameProfile;
import net.minecraft.util.com.mojang.authlib.properties.Property;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;

View File

@ -4,31 +4,29 @@ import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import net.minecraft.server.v1_7_R4.EntityBat;
import net.minecraft.server.v1_7_R4.EntityCreature;
import net.minecraft.server.v1_7_R4.EntityEnderDragon;
import net.minecraft.server.v1_7_R4.EntityInsentient;
import net.minecraft.server.v1_7_R4.Navigation;
import net.minecraft.server.v1_7_R4.PathfinderGoalMoveTowardsRestriction;
import net.minecraft.server.v1_7_R4.PathfinderGoalSelector;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.World;
import org.bukkit.block.BlockFace;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftLivingEntity;
import org.bukkit.craftbukkit.v1_8_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftEntity;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Giant;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftCreature;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import net.minecraft.server.v1_8_R2.EntityBat;
import net.minecraft.server.v1_8_R2.EntityCreature;
import net.minecraft.server.v1_8_R2.EntityEnderDragon;
import net.minecraft.server.v1_8_R2.EntityInsentient;
import net.minecraft.server.v1_8_R2.NavigationAbstract;
import net.minecraft.server.v1_8_R2.PathfinderGoalMoveTowardsRestriction;
import net.minecraft.server.v1_8_R2.PathfinderGoalSelector;
public class UtilEnt
{
@ -50,17 +48,17 @@ public class UtilEnt
public static void silence(Entity entity, boolean silence)
{
((CraftEntity)entity).getHandle().Silent = silence;
((CraftEntity)entity).getHandle().setSilent(silence);
}
public static void ghost(Entity entity, boolean ghost, boolean invisible)
{
if (entity instanceof LivingEntity)
{
((CraftLivingEntity)entity).getHandle().ghost = ghost;
((LivingEntity) entity).setGhost(ghost);
}
((CraftEntity)entity).getHandle().Invisible = invisible;
((CraftEntity)entity).getHandle().setMineplexInvisible(invisible);
((CraftEntity)entity).getHandle().setInvisible(invisible);
}
@ -70,8 +68,8 @@ public class UtilEnt
{
EntityInsentient creature = (EntityInsentient)((CraftEntity)leashed).getHandle();
creature.PullWhileLeashed = pull;
creature.BreakLeash = breakable;
creature.setPullWhileLeashed(pull);
creature.setShouldBreakLeash(breakable);
}
leashed.setLeashHolder(holder);
@ -127,8 +125,8 @@ public class UtilEnt
{
EntityInsentient creature = (EntityInsentient)((CraftEntity)entity).getHandle();
creature.Vegetated = true;
creature.Silent = mute;
creature.setVegetated(true);
creature.setSilent(mute);
((List)_pathfinderBList.get(((PathfinderGoalSelector)_goalSelector.get(creature)))).clear();
((List)_pathfinderCList.get(((PathfinderGoalSelector)_goalSelector.get(creature)))).clear();
@ -139,14 +137,14 @@ public class UtilEnt
if (((CraftEntity)entity).getHandle() instanceof EntityBat)
{
((EntityBat)((CraftEntity)entity).getHandle()).Vegetated = true;
((EntityBat)((CraftEntity)entity).getHandle()).setVegetated(true);
}
if (((CraftEntity)entity).getHandle() instanceof EntityEnderDragon)
{
EntityEnderDragon creature = (EntityEnderDragon)((CraftEntity)entity).getHandle();
creature.Vegetated = true;
creature.setVegetated(true);
}
}
catch (IllegalArgumentException e)
@ -545,7 +543,7 @@ public class UtilEnt
return;
EntityCreature ec = ((CraftCreature)ent).getHandle();
Navigation nav = ec.getNavigation();
NavigationAbstract nav = ec.getNavigation();
if (UtilMath.offset(ent.getLocation(), target) > 16)
{
@ -597,7 +595,7 @@ public class UtilEnt
{
try
{
Field field = net.minecraft.server.v1_7_R4.Entity.class.getDeclaredField("entityCount");
Field field = net.minecraft.server.v1_8_R2.Entity.class.getDeclaredField("entityCount");
field.setAccessible(true);
int entityId = field.getInt(null);
if (modifynumber) {

View File

@ -4,9 +4,9 @@ import org.bukkit.Color;
import org.bukkit.FireworkEffect;
import org.bukkit.FireworkEffect.Type;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftFirework;
import org.bukkit.craftbukkit.v1_8_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftFirework;
import org.bukkit.entity.Firework;
import org.bukkit.inventory.meta.FireworkMeta;
import org.bukkit.util.Vector;
@ -15,9 +15,9 @@ public class UtilFirework
{
public static void playFirework(Location loc, FireworkEffect fe)
{
Firework firework = (Firework) loc.getWorld().spawn(loc, Firework.class);
Firework firework = loc.getWorld().spawn(loc, Firework.class);
FireworkMeta data = (FireworkMeta) firework.getFireworkMeta();
FireworkMeta data = firework.getFireworkMeta();
data.clearEffects();
data.setPower(1);
data.addEffect(fe);
@ -32,9 +32,9 @@ public class UtilFirework
{
try
{
Firework fw = (Firework) loc.getWorld().spawn(loc, Firework.class);
Firework fw = loc.getWorld().spawn(loc, Firework.class);
FireworkMeta data = (FireworkMeta) fw.getFireworkMeta();
FireworkMeta data = fw.getFireworkMeta();
data.clearEffects();
data.setPower(power);
data.addEffect(fe);
@ -56,7 +56,6 @@ public class UtilFirework
public void detonateFirework(Firework firework)
{
((CraftWorld)firework.getWorld()).getHandle().broadcastEntityEffect(((CraftEntity)firework).getHandle(), (byte)17);
firework.remove();
}

View File

@ -2,11 +2,10 @@ package mineplex.core.common.util;
import java.lang.reflect.Field;
import net.minecraft.server.v1_7_R4.PacketPlayOutWorldParticles;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R2.PacketPlayOutWorldParticles;
public class UtilParticle
{

View File

@ -603,6 +603,11 @@ public class UtilPlayer
return false;
}
public static boolean is1_8(Player player)
{
return true;
}
/*
public void setListName(Player player, CoreClient client)
{

View File

@ -1,19 +1,18 @@
package mineplex.core.common.util;
import net.minecraft.server.v1_7_R4.ChatSerializer;
import net.minecraft.server.v1_7_R4.IChatBaseComponent;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.spigotmc.ProtocolInjector;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_8_R2.IChatBaseComponent;
import net.minecraft.server.v1_8_R2.PacketPlayOutPlayerListHeaderFooter;
import net.minecraft.server.v1_8_R2.PacketPlayOutTitle;
public class UtilTabTitle
{
private static final int PROTOCOL_VERSION = 47;
public static void broadcastHeader(String header)
{
broadcastHeaderAndFooter(header, null);
@ -52,9 +51,8 @@ public class UtilTabTitle
public static void doHeaderAndFooter(Player p, String rawHeader, String rawFooter)
{
CraftPlayer player = (CraftPlayer) p;
if (player.getHandle().playerConnection.networkManager.getVersion() != PROTOCOL_VERSION) return;
IChatBaseComponent header = ChatSerializer.a(TextConverter.convert(rawHeader));
IChatBaseComponent footer = ChatSerializer.a(TextConverter.convert(rawFooter));
IChatBaseComponent header = IChatBaseComponent.ChatSerializer.a(TextConverter.convert(rawHeader));
IChatBaseComponent footer = IChatBaseComponent.ChatSerializer.a(TextConverter.convert(rawFooter));
if (header == null || footer == null)
{
TabTitleCache titleCache = TabTitleCache.getTabTitle(p.getUniqueId());
@ -66,7 +64,7 @@ public class UtilTabTitle
if (headerString != null)
{
rawHeader = headerString;
header = ChatSerializer.a(TextConverter.convert(headerString));
header = IChatBaseComponent.ChatSerializer.a(TextConverter.convert(headerString));
}
}
if (footer == null)
@ -75,13 +73,16 @@ public class UtilTabTitle
if (footerString != null)
{
rawHeader = footerString;
header = ChatSerializer.a(TextConverter.convert(footerString));
header = IChatBaseComponent.ChatSerializer.a(TextConverter.convert(footerString));
}
}
}
}
TabTitleCache.addTabTitle(p.getUniqueId(), new TabTitleCache(rawHeader, rawFooter));
ProtocolInjector.PacketTabHeader packet = new ProtocolInjector.PacketTabHeader(header, footer);
PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter();
packet.a = header;
packet.b = footer;
player.getHandle().playerConnection.sendPacket(packet);
}

View File

@ -1,12 +1,11 @@
package mineplex.core.common.util;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
import net.minecraft.server.v1_7_R4.ChatMessage;
import org.spigotmc.ProtocolInjector.PacketTitle;
import org.spigotmc.ProtocolInjector.PacketTitle.Action;
import net.minecraft.server.v1_8_R2.ChatMessage;
import net.minecraft.server.v1_8_R2.Packet;
import net.minecraft.server.v1_8_R2.PacketPlayOutTitle;
/**
* Created by Shaun on 9/5/2014.
@ -52,7 +51,7 @@ public class UtilTextMiddle
text = "";
ChatMessage message = new ChatMessage(text);
PacketTitle packet = new PacketTitle(Action.TITLE, message);
PacketPlayOutTitle packet = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.TITLE, message);
sendPacket(packet, players);
}
@ -67,7 +66,7 @@ public class UtilTextMiddle
text = "";
ChatMessage message = new ChatMessage(text);
PacketTitle packet = new PacketTitle(Action.SUBTITLE, message);
PacketPlayOutTitle packet = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.SUBTITLE, message);
sendPacket(packet, players);
}
@ -78,7 +77,7 @@ public class UtilTextMiddle
*/
private static void setTimings(int fadeInTicks, int stayTicks, int fadeOutTicks, Player... players)
{
PacketTitle packet = new PacketTitle(Action.TIMES, fadeInTicks, stayTicks, fadeOutTicks);
PacketPlayOutTitle packet = new PacketPlayOutTitle(fadeInTicks, stayTicks, fadeOutTicks);
sendPacket(packet, players);
}
@ -87,7 +86,7 @@ public class UtilTextMiddle
*/
public static void clear(Player... players)
{
PacketTitle packet = new PacketTitle(Action.CLEAR);
PacketPlayOutTitle packet = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.CLEAR, null);
sendPacket(packet, players);
}
@ -98,20 +97,17 @@ public class UtilTextMiddle
*/
public static void reset(Player... players)
{
PacketTitle packet = new PacketTitle(Action.RESET);
PacketPlayOutTitle packet = new PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction.RESET, null);
sendPacket(packet, players);
}
private static void sendPacket(PacketTitle packet, Player... players)
private static void sendPacket(Packet packet, Player... players)
{
for (Player player : players)
{
if (UtilPlayer.is1_8(player))
{
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
}
}
public static String progress(float exp)
{

View File

@ -1,16 +1,16 @@
package mineplex.core.common.util;
import mineplex.core.common.DummyEntity;
import net.minecraft.server.v1_7_R4.DataWatcher;
import net.minecraft.server.v1_7_R4.MathHelper;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_8_R2.DataWatcher;
import net.minecraft.server.v1_8_R2.MathHelper;
import net.minecraft.server.v1_8_R2.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_8_R2.PacketPlayOutSpawnEntityLiving;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_8_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftPlayer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;

View File

@ -7,6 +7,7 @@ import java.util.Map.Entry;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import com.google.gson.Gson;
import mineplex.core.MiniPlugin;
import mineplex.core.account.command.UpdateRank;
import mineplex.core.account.event.ClientUnloadEvent;
@ -28,7 +29,6 @@ import mineplex.serverdata.servers.ServerManager;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.craftbukkit.libs.com.google.gson.Gson;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;

View File

@ -10,7 +10,7 @@ import java.util.List;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.libs.com.google.gson.reflect.TypeToken;
import com.google.gson.reflect.TypeToken;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.account.ILoginProcessor;

View File

@ -3,12 +3,12 @@ package mineplex.core.disguise.disguises;
import mineplex.core.common.*;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftEntity;
import net.minecraft.server.v1_7_R4.DataWatcher;
import net.minecraft.server.v1_7_R4.Entity;
import net.minecraft.server.v1_7_R4.Packet;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_8_R2.DataWatcher;
import net.minecraft.server.v1_8_R2.Entity;
import net.minecraft.server.v1_8_R2.Packet;
import net.minecraft.server.v1_8_R2.PacketPlayOutEntityMetadata;
public abstract class DisguiseBase
{

View File

@ -1,15 +1,13 @@
package mineplex.core.disguise.disguises;
import org.spigotmc.ProtocolData;
public abstract class DisguiseHuman extends DisguiseLiving
{
public DisguiseHuman(org.bukkit.entity.Entity entity)
{
super(entity);
DataWatcher.a(10, new ProtocolData.HiddenByte( (byte) 0 ) ); // Spigot - protocol patch, handle new metadata value
DataWatcher.a(16, new ProtocolData.DualByte( (byte) 0, (byte) 0 ) );
DataWatcher.a(10, (byte) 0); // todo
DataWatcher.a(16, (byte) 0);
DataWatcher.a(17, Float.valueOf(0.0F));
DataWatcher.a(18, Integer.valueOf(0));
}

View File

@ -2,7 +2,7 @@ package mineplex.core.disguise.disguises;
import java.util.Random;
import net.minecraft.server.v1_7_R4.EntityLiving;
import net.minecraft.server.v1_8_R2.EntityLiving;
public abstract class DisguiseLiving extends DisguiseBase
{

View File

@ -5,11 +5,11 @@ import java.sql.SQLException;
import java.util.UUID;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.libs.com.google.gson.Gson;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.plugin.java.JavaPlugin;
import com.google.gson.Gson;
import mineplex.core.MiniDbClientPlugin;
import mineplex.core.account.CoreClientManager;
import mineplex.core.account.event.ClientWebResponseEvent;

View File

@ -19,17 +19,18 @@ import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilServer;
import mineplex.core.disguise.DisguiseManager;
import mineplex.core.donation.DonationManager;
import net.minecraft.server.v1_7_R4.EntityCreature;
import net.minecraft.server.v1_7_R4.EntityWither;
import net.minecraft.server.v1_7_R4.Navigation;
import net.minecraft.server.v1_8_R2.EntityCreature;
import net.minecraft.server.v1_8_R2.EntityWither;
import net.minecraft.server.v1_8_R2.Navigation;
import net.minecraft.server.v1_8_R2.NavigationAbstract;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.craftbukkit.libs.com.google.gson.Gson;
import org.bukkit.craftbukkit.v1_7_R4.CraftWorld;
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftCreature;
import com.google.gson.Gson;
import org.bukkit.craftbukkit.v1_8_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_8_R2.entity.CraftCreature;
import org.bukkit.entity.Ageable;
import org.bukkit.entity.Creature;
import org.bukkit.entity.Entity;
@ -328,7 +329,7 @@ public class PetManager extends MiniClientPlugin<PetClient>
if ((xDiff + yDiff + zDiff) > 4)
{
EntityCreature ec = ((CraftCreature) pet).getHandle();
Navigation nav = ec.getNavigation();
NavigationAbstract nav = ec.getNavigation();
int xIndex = -1;
int zIndex = -1;

View File

@ -2,7 +2,7 @@ package mineplex.core.pet.repository;
import java.util.List;
import org.bukkit.craftbukkit.libs.com.google.gson.reflect.TypeToken;
import com.google.gson.reflect.TypeToken;
import mineplex.core.pet.repository.token.PetChangeToken;
import mineplex.core.pet.repository.token.PetExtraToken;

View File

@ -3,13 +3,13 @@ package mineplex.core.pet.types;
import java.lang.reflect.Field;
import java.util.HashMap;
import org.bukkit.craftbukkit.v1_7_R4.SpigotTimings;
import org.bukkit.craftbukkit.v1_8_R2.SpigotTimings;
import org.bukkit.entity.EntityType;
import net.minecraft.server.v1_7_R4.EntityTypes;
import net.minecraft.server.v1_7_R4.EntityWither;
import net.minecraft.server.v1_7_R4.MathHelper;
import net.minecraft.server.v1_7_R4.World;
import net.minecraft.server.v1_8_R2.EntityTypes;
import net.minecraft.server.v1_8_R2.EntityWither;
import net.minecraft.server.v1_8_R2.MathHelper;
import net.minecraft.server.v1_8_R2.World;
public class CustomWither extends EntityWither
{

View File

@ -8,10 +8,10 @@ import java.util.ArrayList;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.WorldCreator;
import net.minecraft.util.org.apache.commons.io.FileUtils;
import mineplex.core.common.util.MapUtil;
import mineplex.core.common.util.ZipUtil;
import org.apache.commons.io.FileUtils;
public class WorldManager
{

View File

@ -5,12 +5,12 @@ import java.io.IOException;
import org.bukkit.World;
import org.bukkit.entity.Player;
import net.minecraft.util.org.apache.commons.io.FileUtils;
import mineplex.core.common.util.F;
import mineplex.core.common.util.MapUtil;
import mineplex.mapparser.GameType;
import mineplex.mapparser.MapParser;
import org.apache.commons.io.FileUtils;
/**
* Created by Shaun on 8/16/2014.

View File

@ -4,9 +4,9 @@ import java.io.File;
import java.io.IOException;
import org.bukkit.entity.Player;
import net.minecraft.util.org.apache.commons.io.FileUtils;
import mineplex.mapparser.MapParser;
import org.apache.commons.io.FileUtils;
/**
* Created by Shaun on 8/16/2014.

View File

@ -4,12 +4,12 @@ import java.io.File;
import org.bukkit.World;
import org.bukkit.entity.Player;
import net.minecraft.util.org.apache.commons.io.FileUtils;
import mineplex.core.common.util.F;
import mineplex.core.common.util.MapUtil;
import mineplex.mapparser.GameType;
import mineplex.mapparser.MapParser;
import org.apache.commons.io.FileUtils;
/**
* Created by Shaun on 8/16/2014.