Start work on making it compile again.

This commit is contained in:
md_5
2013-01-17 11:59:59 +11:00
parent 098ca5920e
commit 592a504e77
14 changed files with 168 additions and 114 deletions

View File

@@ -105,6 +105,9 @@ public abstract class ProxyServer
/**
* Start this instance so that it may accept connections.
*
* @throws Exception any exception thrown during startup causing the
* instance to fail to boot
*/
public abstract void start();
public abstract void start() throws Exception;
}

View File

@@ -3,6 +3,6 @@ package net.md_5.bungee.api.connection;
/**
* Represents a player physically connected to the world hosted on this server.
*/
public abstract class ConnectedPlayer extends ProxiedPlayer
public interface ConnectedPlayer extends ProxiedPlayer
{
}

View File

@@ -8,15 +8,23 @@ import net.md_5.bungee.api.CommandSender;
* Represents a player who's connection is being connected to somewhere else,
* whether it be a remote or embedded server.
*/
public abstract class ProxiedPlayer implements Connection, CommandSender
public interface ProxiedPlayer extends Connection, CommandSender
{
/**
* Name displayed to other users in areas such as the tab list.
* Gets this player's display name.
*
* @return the players current display name
*/
@Getter
@Setter
private String displayName;
public String getDisplayName();
/**
* Sets this players display name to be used as their nametag and tab list
* name.
*
* @param name the name to set
*/
public void setDisplayName(String name);
/**
* Connects / transfers this user to the specified connection, gracefully
@@ -25,21 +33,21 @@ public abstract class ProxiedPlayer implements Connection, CommandSender
*
* @param server the new server to connect to
*/
public abstract void connect(Server server);
public void connect(Server server);
/**
* Gets the server this player is connected to.
*
* @return the server this player is connected to
*/
public abstract Server getServer();
public Server getServer();
/**
* Gets the ping time between the proxy and this connection.
*
* @return the current ping time
*/
public abstract int getPing();
public int getPing();
/**
* Completely kick this user from the proxy and all of its child
@@ -47,7 +55,7 @@ public abstract class ProxiedPlayer implements Connection, CommandSender
*
* @param reason the disconnect reason displayed to the player
*/
public abstract void disconnect(String reason);
public void disconnect(String reason);
/**
* Send a plugin message to this player.
@@ -55,5 +63,5 @@ public abstract class ProxiedPlayer implements Connection, CommandSender
* @param channel the channel to send this data via
* @param data the data to send
*/
public abstract void sendData(String channel, byte[] data);
public void sendData(String channel, byte[] data);
}

View File

@@ -11,22 +11,15 @@ import net.md_5.bungee.api.ServerPing;
/**
* Represents a destination which this proxy might connect to.
*/
@RequiredArgsConstructor
public abstract class Server implements Connection
public interface Server extends Connection
{
/**
* Information about the address, name and configuration regarding this
* server.
* Returns the basic information about this server.
*
* @return the {@link ServerInfo} for this server
*/
@Getter
private final ServerInfo info;
@Override
public InetSocketAddress getAddress()
{
return info.getAddress();
}
public ServerInfo getInfo();
/**
* Send data by any available means to this server.