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) {
StructureModifier<Object> mods = event.getPacket().getModifier();
event.setPacket(new PacketContainer(event.getPacketID()));
mods.write(0, mods.read(0));
mods.write(1, disguise.getWatcher().convert((List<WatchableObject>) mods.read(1)));
StructureModifier<Object> newMods = event.getPacket().getModifier();
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) {
if (disguise.getType().isPlayer()) {
StructureModifier<Object> mods = event.getPacket().getModifier();