Add server getPlayer method and rename the ping/getPlayerCount methods.
This commit is contained in:
parent
6b6aae8020
commit
a946e988bf
@ -7,6 +7,7 @@ import java.util.Collection;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.md_5.bungee.api.config.ConfigurationAdapter;
|
import net.md_5.bungee.api.config.ConfigurationAdapter;
|
||||||
|
import net.md_5.bungee.api.connection.ProxiedPlayer;
|
||||||
import net.md_5.bungee.api.plugin.Plugin;
|
import net.md_5.bungee.api.plugin.Plugin;
|
||||||
|
|
||||||
public abstract class ProxyServer
|
public abstract class ProxyServer
|
||||||
@ -51,11 +52,11 @@ public abstract class ProxyServer
|
|||||||
public abstract Logger getLogger();
|
public abstract Logger getLogger();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return all currently networked connections to this proxy.
|
* Return all players currently connected.
|
||||||
*
|
*
|
||||||
* @return all networked users
|
* @return all connected players
|
||||||
*/
|
*/
|
||||||
public abstract Collection<Connection> getConnections();
|
public abstract Collection<ProxiedPlayer> getPlayers();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the {@link PluginManager} associated with loading plugins and
|
* Get the {@link PluginManager} associated with loading plugins and
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package net.md_5.bungee.api.connection;
|
package net.md_5.bungee.api.connection;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
import java.util.Collection;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.md_5.bungee.api.Callback;
|
import net.md_5.bungee.api.Callback;
|
||||||
@ -40,5 +41,12 @@ public abstract class Server implements Connection
|
|||||||
*
|
*
|
||||||
* @param callback the callback to call when the count has been retrieved.
|
* @param callback the callback to call when the count has been retrieved.
|
||||||
*/
|
*/
|
||||||
public abstract void getPlayerCount(Callback<ServerPing> callback);
|
public abstract void ping(Callback<ServerPing> callback);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all players on this instance connected to this server.
|
||||||
|
*
|
||||||
|
* @return all players connected to this server
|
||||||
|
*/
|
||||||
|
public abstract Collection<ProxiedPlayer> getPlayers();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user