From: Miguel A. B. L. <ari...@us...> - 2008-03-14 20:34:27
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/client/actions In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv31573 Added Files: SentenceAction.java Log Message: Added sentence server side. Tested. --- NEW FILE: SentenceAction.java --- package games.stendhal.client.actions; import games.stendhal.client.StendhalClient; import marauroa.common.game.RPAction; /** * Add a player to buddy list. */ class SentenceAction implements SlashAction { /** * Execute a chat command. * * @param params * The formal parameters. * @param remainder * Line content after parameters. * * @return <code>true</code> if command was handled. */ public boolean execute(String[] params, String remainder) { if (params == null) { return false; } RPAction add = new RPAction(); add.put("type", "sentence"); add.put("value", remainder); StendhalClient.get().send(add); return true; } /** * Get the maximum number of formal parameters. * * @return The parameter count. */ public int getMaximumParameters() { return 0; } /** * Get the minimum number of formal parameters. * * @return The parameter count. */ public int getMinimumParameters() { return 0; } } |