Add ProxiedPlayer.chat, see #146
This commit is contained in:
parent
3b90737273
commit
59efec128d
@ -62,4 +62,11 @@ public interface ProxiedPlayer extends Connection, CommandSender
|
||||
* @return the pending connection that this player used
|
||||
*/
|
||||
public PendingConnection getPendingConnection();
|
||||
|
||||
/**
|
||||
* Make this player chat (say something), to the server he is currently on.
|
||||
*
|
||||
* @param message the message to say
|
||||
*/
|
||||
public void chat(String message);
|
||||
}
|
||||
|
@ -160,6 +160,13 @@ public final class UserConnection implements ProxiedPlayer
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void chat(String message)
|
||||
{
|
||||
Preconditions.checkState( server != null, "Not connected to server" );
|
||||
server.getCh().write( new Packet3Chat( message ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(String message)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user