Auctally set the metadata..

This commit is contained in:
Andrew 2013-07-07 19:18:17 +12:00
parent 1db5b1ecd0
commit 728766ef48

View File

@ -73,8 +73,9 @@ public class LibsDisguises extends JavaPlugin implements Listener {
} else if (event.getPacketID() == Packets.Server.ENTITY_METADATA) { } else if (event.getPacketID() == Packets.Server.ENTITY_METADATA) {
StructureModifier<Object> mods = event.getPacket().getModifier(); StructureModifier<Object> mods = event.getPacket().getModifier();
event.setPacket(new PacketContainer(event.getPacketID())); event.setPacket(new PacketContainer(event.getPacketID()));
mods.write(0, mods.read(0)); StructureModifier<Object> newMods = event.getPacket().getModifier();
mods.write(1, disguise.getWatcher().convert((List<WatchableObject>) mods.read(1))); newMods.write(0, mods.read(0));
newMods.write(1, disguise.getWatcher().convert((List<WatchableObject>) mods.read(1)));
} else if (event.getPacketID() == Packets.Server.NAMED_ENTITY_SPAWN) { } else if (event.getPacketID() == Packets.Server.NAMED_ENTITY_SPAWN) {
if (disguise.getType().isPlayer()) { if (disguise.getType().isPlayer()) {
StructureModifier<Object> mods = event.getPacket().getModifier(); StructureModifier<Object> mods = event.getPacket().getModifier();