fix getting altcontrol peers
All checks were successful
/ Build BaseBand (push) Successful in 2m45s

This commit is contained in:
Daniella / Tove 2024-10-06 05:05:18 +02:00
parent 389da94385
commit 03a3716f6d
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -19,6 +19,7 @@ import de.com.baseband.client.util.adapt.Marker;
import de.com.baseband.client.util.interact.Chat;
import java.util.ArrayList;
import java.util.Iterator;
@ClientCategory
public class AltControl extends Feature {
@ -86,7 +87,7 @@ public class AltControl extends Feature {
public void onDataResponse(RemoteDataRequestEvent.Response event) {
peers.add(event.profile);
if(peers.size() == BaseBand.REMOTE_EVENT_BUS.getPeers()) {
BaseBand.notifyAll("§a§lPeers: §r" + String.join(", ", (Iterable<? extends CharSequence>) peers.stream().map(GameProfile::getName)));
BaseBand.notifyAll("§a§lPeers: §r" + String.join(", ", (Iterable<String>) () -> peers.stream().map(GameProfile::getName).iterator()));
}
}