Don't send empty meta

This commit is contained in:
libraryaddict 2021-05-26 06:15:12 +12:00
parent 796ae26ed7
commit caa25296be

View File

@ -30,17 +30,18 @@ public class PacketHandlerMetadata implements IPacketHandler {
}
@Override
public void handle(Disguise disguise, PacketContainer sentPacket, LibsPackets packets, Player observer,
Entity entity) {
public void handle(Disguise disguise, PacketContainer sentPacket, LibsPackets packets, Player observer, Entity entity) {
packets.clear();
if (!DisguiseConfig.isMetaPacketsEnabled()) {
return;
}
List<WrappedWatchableObject> watchableObjects = disguise.getWatcher()
.convert(observer, sentPacket.getWatchableCollectionModifier().read(0));
List<WrappedWatchableObject> watchableObjects = disguise.getWatcher().convert(observer, sentPacket.getWatchableCollectionModifier().read(0));
if (watchableObjects.isEmpty()) {
return;
}
PacketContainer metaPacket = new PacketContainer(PacketType.Play.Server.ENTITY_METADATA);