From bed69e85d34c4ebfca063579ae00fb60bf968b37 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 21 May 2013 18:16:33 +1200 Subject: [PATCH] Fixed exp orb packet no sent --- .../disguise/DisguiseTypes/Disguise.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java b/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java index 103dd457..49a88e1b 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java @@ -30,7 +30,12 @@ public class Disguise { public Packet constructPacket(Player p) { Packet spawnPacket = null; - if (getType().isMob()) { + if (getType() == DisguiseType.EXPERIENCE_ORB) { + + Entity entity = getEntity(((CraftPlayer) p).getHandle().world, p.getLocation(), p.getEntityId()); + spawnPacket = new Packet26AddExpOrb((EntityExperienceOrb) entity); + + } else if (getType().isMob()) { EntityLiving entityLiving = ((MobDisguise) this).getEntityLiving(((CraftPlayer) p).getHandle().world, p.getLocation(), p.getEntityId()); @@ -53,11 +58,6 @@ public class Disguise { spawnPacket = new Packet20NamedEntitySpawn(entityHuman); ((Packet20NamedEntitySpawn) spawnPacket).b = ((PlayerDisguise) this).getName(); - } else if (getType() == DisguiseType.EXPERIENCE_ORB) { - - Entity entity = getEntity(((CraftPlayer) p).getHandle().world, p.getLocation(), p.getEntityId()); - spawnPacket = new Packet26AddExpOrb((EntityExperienceOrb) entity); - } return spawnPacket; }