Well, it compiles, time to start fixing stuff.

This commit is contained in:
md_5
2013-01-19 13:33:04 +11:00
parent cf42a10ba4
commit bf1e7f09a9
8 changed files with 51 additions and 42 deletions

View File

@@ -3,6 +3,7 @@ package net.md_5.bungee.api;
import net.md_5.bungee.api.plugin.PluginManager;
import com.google.common.base.Preconditions;
import java.util.Collection;
import java.util.Map;
import java.util.logging.Logger;
import lombok.Getter;
import net.md_5.bungee.api.config.ConfigurationAdapter;
@@ -68,13 +69,24 @@ public abstract class ProxyServer
public abstract ProxiedPlayer getPlayer(String name);
/**
* Get a server by its name.
* Get a server by its name. The instance returned will be taken from a
* player currently on that server to facilitate abstract proxy -> server
* actions.
*
* @param name the name to lookup
* @return the associated server
*/
public abstract Server getServer(String name);
/**
* Return all servers registered to this proxy, keyed by name. Unlike the
* methods in {@link ConfigurationAdapter#getServers()}, this will not
* return a fresh map each time.
*
* @return all registered remote server destinations
*/
public abstract Map<String, ServerInfo> getServers();
/**
* Get the {@link PluginManager} associated with loading plugins and
* dispatching events. It is recommended that implementations use the

View File

@@ -1,9 +1,5 @@
package net.md_5.bungee.api.connection;
import java.net.InetSocketAddress;
import java.util.Collection;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import net.md_5.bungee.api.Callback;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.ServerPing;
@@ -35,11 +31,4 @@ public interface Server extends Connection
* @param callback the callback to call when the count has been retrieved.
*/
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();
}