Don't send empty meta
This commit is contained in:
parent
796ae26ed7
commit
caa25296be
@ -30,17 +30,18 @@ public class PacketHandlerMetadata implements IPacketHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(Disguise disguise, PacketContainer sentPacket, LibsPackets packets, Player observer,
|
public void handle(Disguise disguise, PacketContainer sentPacket, LibsPackets packets, Player observer, Entity entity) {
|
||||||
Entity entity) {
|
|
||||||
|
|
||||||
packets.clear();
|
packets.clear();
|
||||||
|
|
||||||
if (!DisguiseConfig.isMetaPacketsEnabled()) {
|
if (!DisguiseConfig.isMetaPacketsEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<WrappedWatchableObject> watchableObjects = disguise.getWatcher()
|
List<WrappedWatchableObject> watchableObjects = disguise.getWatcher().convert(observer, sentPacket.getWatchableCollectionModifier().read(0));
|
||||||
.convert(observer, sentPacket.getWatchableCollectionModifier().read(0));
|
|
||||||
|
if (watchableObjects.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PacketContainer metaPacket = new PacketContainer(PacketType.Play.Server.ENTITY_METADATA);
|
PacketContainer metaPacket = new PacketContainer(PacketType.Play.Server.ENTITY_METADATA);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user