Add tab list getter to api

This commit is contained in:
md_5 2013-06-16 07:56:38 +10:00
parent fa0671ab2a
commit d4cbac1bdf
2 changed files with 18 additions and 10 deletions

View File

@ -17,7 +17,7 @@ public interface ProxiedPlayer extends Connection, CommandSender
* *
* @return the players current display name * @return the players current display name
*/ */
public String getDisplayName(); String getDisplayName();
/** /**
* Sets this players display name to be used as their nametag and tab list * Sets this players display name to be used as their nametag and tab list
@ -25,7 +25,7 @@ public interface ProxiedPlayer extends Connection, CommandSender
* *
* @param name the name to set * @param name the name to set
*/ */
public void setDisplayName(String name); void setDisplayName(String name);
/** /**
* Connects / transfers this user to the specified connection, gracefully * Connects / transfers this user to the specified connection, gracefully
@ -34,21 +34,21 @@ public interface ProxiedPlayer extends Connection, CommandSender
* *
* @param target the new server to connect to * @param target the new server to connect to
*/ */
public void connect(ServerInfo target); void connect(ServerInfo target);
/** /**
* Gets the server this player is connected to. * Gets the server this player is connected to.
* *
* @return the server this player is connected to * @return the server this player is connected to
*/ */
public Server getServer(); Server getServer();
/** /**
* Gets the ping time between the proxy and this connection. * Gets the ping time between the proxy and this connection.
* *
* @return the current ping time * @return the current ping time
*/ */
public int getPing(); int getPing();
/** /**
* Send a plugin message to this player. * Send a plugin message to this player.
@ -56,28 +56,28 @@ public interface ProxiedPlayer extends Connection, CommandSender
* @param channel the channel to send this data via * @param channel the channel to send this data via
* @param data the data to send * @param data the data to send
*/ */
public void sendData(String channel, byte[] data); void sendData(String channel, byte[] data);
/** /**
* Get the pending connection that belongs to this player. * Get the pending connection that belongs to this player.
* *
* @return the pending connection that this player used * @return the pending connection that this player used
*/ */
public PendingConnection getPendingConnection(); PendingConnection getPendingConnection();
/** /**
* Make this player chat (say something), to the server he is currently on. * Make this player chat (say something), to the server he is currently on.
* *
* @param message the message to say * @param message the message to say
*/ */
public void chat(String message); void chat(String message);
/** /**
* Send a request to change the players texture pack. * Send a request to change the players texture pack.
* *
* @param pack the pack to request * @param pack the pack to request
*/ */
public void setTexturePack(TexturePackInfo pack); void setTexturePack(TexturePackInfo pack);
/** /**
* Sets the new tab list for the user. At this stage it is not advisable to * Sets the new tab list for the user. At this stage it is not advisable to
@ -85,5 +85,12 @@ public interface ProxiedPlayer extends Connection, CommandSender
* *
* @param list the new list * @param list the new list
*/ */
public void setTabList(TabListHandler list); void setTabList(TabListHandler list);
/**
* Get the current tab list.
*
* @return the tab list in use by this user
*/
TabListHandler getTabList();
} }

View File

@ -120,6 +120,7 @@ public final class UserConnection implements ProxiedPlayer
} }
} }
@Override
public void setTabList(TabListHandler tabList) public void setTabList(TabListHandler tabList)
{ {
tabList.init( this ); tabList.init( this );