Search in sources :

Example 1 with MultiValue

use of de.dytanic.cloudnet.lib.MultiValue in project CloudNet by Dytanic.

the class CloudProxy method update.

public void update() {
    ProxyInfo proxyInfo = new ProxyInfo(CloudAPI.getInstance().getServiceId(), CloudAPI.getInstance().getConfig().getString("host"), 0, true, new ArrayList<>(CollectionWrapper.transform(ProxyServer.getInstance().getPlayers(), new Catcher<MultiValue<UUID, String>, ProxiedPlayer>() {

        @Override
        public MultiValue<UUID, String> doCatch(ProxiedPlayer key) {
            return new MultiValue<>(key.getUniqueId(), key.getName());
        }
    })), proxyProcessMeta.getMemory(), ProxyServer.getInstance().getOnlineCount());
    CloudAPI.getInstance().update(proxyInfo);
}
Also used : ProxyInfo(de.dytanic.cloudnet.lib.server.info.ProxyInfo) ProxiedPlayer(net.md_5.bungee.api.connection.ProxiedPlayer) MultiValue(de.dytanic.cloudnet.lib.MultiValue)

Aggregations

MultiValue (de.dytanic.cloudnet.lib.MultiValue)1 ProxyInfo (de.dytanic.cloudnet.lib.server.info.ProxyInfo)1 ProxiedPlayer (net.md_5.bungee.api.connection.ProxiedPlayer)1