Don't send empty meta

This commit is contained in:
libraryaddict 2021-05-26 06:15:12 +12:00
parent 796ae26ed7
commit caa25296be
1 changed files with 6 additions and 5 deletions

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);