Advertisement
Guest User

Untitled

a guest
Feb 8th, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. package handlers.voicedcommandhandlers;
  2.  
  3. import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
  4. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  5. import com.l2jserver.gameserver.network.SystemMessageId;
  6.  
  7. public class Title implements IVoicedCommandHandler
  8. {
  9. private static final String[] _voicedCommands =
  10. {
  11. "title"
  12. };
  13.  
  14. private String _title;
  15.  
  16. @Override
  17. public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
  18. {
  19. if (command.startsWith("title"))
  20. {
  21. activeChar.setTitle(_title);
  22. activeChar.sendPacket(SystemMessageId.TITLE_CHANGED);
  23. }
  24. return true;
  25. }
  26.  
  27. @Override
  28. public String[] getVoicedCommandList()
  29. {
  30. return _voicedCommands;
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement