fix: ProtocolLib startup warnings

feat/data-edit-commands
William 11 months ago
parent 2f5ddf6164
commit facbda65a8
No known key found for this signature in database

@ -30,6 +30,7 @@ import org.jetbrains.annotations.NotNull;
import java.util.Set;
import java.util.logging.Level;
import java.util.stream.Collectors;
import static com.comphenix.protocol.PacketType.Play.Client;
@ -74,7 +75,10 @@ public class BukkitLockedPacketListener extends BukkitLockedEventListener implem
// Returns the set of ALL Server packets, excluding the set of allowed packets
@NotNull
private static Set<PacketType> getPacketsToListenFor() {
return Sets.difference(Client.getInstance().values(), ALLOWED_PACKETS);
return Sets.difference(
Client.getInstance().values().stream().filter(PacketType::isSupported).collect(Collectors.toSet()),
ALLOWED_PACKETS
);
}
}

Loading…
Cancel
Save