Compare commits

..

No commits in common. "c26ea7aa248517fc2ae7778eb8a5e63fff538dff" and "f9814721f171ddf606cdbc89a9204ad562d348d7" have entirely different histories.

1 changed files with 3 additions and 14 deletions

View File

@ -1,9 +1,6 @@
package net.krakatoa.proxy.command;
import de.dytanic.cloudnet.driver.CloudNetDriver;
import de.dytanic.cloudnet.driver.service.ServiceInfoSnapshot;
import de.dytanic.cloudnet.ext.bridge.BridgeServiceProperty;
import de.dytanic.cloudnet.ext.bridge.player.ServicePlayer;
import de.dytanic.cloudnet.ext.bridge.ServiceInfoSnapshotUtil;
import java.security.SecureRandom;
import net.md_5.bungee.api.CommandSender;
import net.md_5.bungee.api.chat.TextComponent;
@ -45,18 +42,10 @@ public class CodeCommand extends Command {
// TODO: add url and copy text
//proxiedPlayer.sendMessage(new TextComponent("§eNeuer Code §c§l" + voiceWebCode));
ServiceInfoSnapshot serviceInfoSnapshot = CloudNetDriver.getInstance()
.getCloudServiceProvider().getCloudServiceByName("lobby-1");
assert serviceInfoSnapshot != null;
serviceInfoSnapshot.getProperty(BridgeServiceProperty.PLAYERS).ifPresent(players -> {
for (ServicePlayer player : players) {
System.out.println("player " + player);
}
});
System.out.println("players " + ServiceInfoSnapshotUtil.getGroupOnlineCount("lobby-1"));
proxiedPlayer.sendMessage(
new TextComponent("players "));
new TextComponent("players " + ServiceInfoSnapshotUtil.getGroupOnlineCount("lobby-1")));
}
}