diff --git a/src/me/libraryaddict/disguise/BaseDisguiseCommand.java b/src/me/libraryaddict/disguise/BaseDisguiseCommand.java index b2281871..90979f8e 100644 --- a/src/me/libraryaddict/disguise/BaseDisguiseCommand.java +++ b/src/me/libraryaddict/disguise/BaseDisguiseCommand.java @@ -11,6 +11,8 @@ import me.libraryaddict.disguise.disguisetypes.DisguiseType; import me.libraryaddict.disguise.disguisetypes.MiscDisguise; import me.libraryaddict.disguise.disguisetypes.MobDisguise; import me.libraryaddict.disguise.disguisetypes.PlayerDisguise; +import me.libraryaddict.disguise.disguisetypes.watchers.DroppedItemWatcher; + import org.bukkit.ChatColor; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; diff --git a/src/me/libraryaddict/disguise/PacketsManager.java b/src/me/libraryaddict/disguise/PacketsManager.java index a760a302..33ceb37a 100644 --- a/src/me/libraryaddict/disguise/PacketsManager.java +++ b/src/me/libraryaddict/disguise/PacketsManager.java @@ -220,20 +220,19 @@ public class PacketsManager { StructureModifier mods = spawnPackets[0].getModifier(); mods.write(0, disguisedEntity.getEntityId()); mods.write(1, ((PlayerDisguise) disguise).getName()); - mods.write(2, ((PlayerDisguise) disguise).getName()); - mods.write(3, (int) Math.floor(loc.getX() * 32)); - mods.write(4, (int) Math.floor(loc.getY() * 32)); - mods.write(5, (int) Math.floor(loc.getZ() * 32)); - mods.write(6, yaw); - mods.write(7, (byte) (int) (loc.getPitch() * 256F / 360F)); + mods.write(2, (int) Math.floor(loc.getX() * 32)); + mods.write(3, (int) Math.floor(loc.getY() * 32)); + mods.write(4, (int) Math.floor(loc.getZ() * 32)); + mods.write(5, yaw); + mods.write(6, (byte) (int) (loc.getPitch() * 256F / 360F)); ItemStack item = null; if (disguisedEntity instanceof Player && ((Player) disguisedEntity).getItemInHand() != null) { item = CraftItemStack.asNMSCopy(((Player) disguisedEntity).getItemInHand()); } else if (disguisedEntity instanceof LivingEntity) { item = CraftItemStack.asNMSCopy(((CraftLivingEntity) disguisedEntity).getEquipment().getItemInHand()); } - mods.write(8, (item == null ? 0 : item.id)); - mods.write(9, createDataWatcher(nmsEntity.getDataWatcher(), disguise.getWatcher())); + mods.write(7, (item == null ? 0 : item.id)); + mods.write(8, createDataWatcher(nmsEntity.getDataWatcher(), disguise.getWatcher())); } else if (disguise.getType().isMob()) {