Advertisement
Guest User

Untitled

a guest
Jan 6th, 2011
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.81 KB | None | 0 0
  1. ### Eclipse Workspace Patch 1.0
  2. #P datapack_development
  3. Index: data/scripts/handlers/MasterHandler.java
  4. ===================================================================
  5. --- data/scripts/handlers/MasterHandler.java (revision 7732)
  6. +++ data/scripts/handlers/MasterHandler.java (working copy)
  7. @@ -244,6 +244,7 @@
  8. import handlers.voicedcommandhandlers.ChatAdmin;
  9. import handlers.voicedcommandhandlers.Debug;
  10. import handlers.voicedcommandhandlers.Lang;
  11. +import handlers.voicedcommandhandlers.NoobHelper;
  12. import handlers.voicedcommandhandlers.TvTVoicedInfo;
  13. import handlers.voicedcommandhandlers.Wedding;
  14. import handlers.voicedcommandhandlers.stats;
  15. @@ -550,6 +551,8 @@
  16. VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Lang());
  17. if (Config.L2JMOD_DEBUG_VOICE_COMMAND)
  18. VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Debug());
  19. +
  20. + VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new NoobHelper());
  21. _log.config("Loaded " + VoicedCommandHandler.getInstance().size() + " VoicedHandlers");
  22. }
  23.  
  24. Index: data/scripts/handlers/voicedcommandhandlers/NoobHelper.java
  25. ===================================================================
  26. --- data/scripts/handlers/voicedcommandhandlers/NoobHelper.java (revision 0)
  27. +++ data/scripts/handlers/voicedcommandhandlers/NoobHelper.java (revision 0)
  28. @@ -0,0 +1,43 @@
  29. +/*
  30. + * This program is free software: you can redistribute it and/or modify it under
  31. + * the terms of the GNU General Public License as published by the Free Software
  32. + * Foundation, either version 3 of the License, or (at your option) any later
  33. + * version.
  34. + *
  35. + * This program is distributed in the hope that it will be useful, but WITHOUT
  36. + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  37. + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  38. + * details.
  39. + *
  40. + * You should have received a copy of the GNU General Public License along with
  41. + * this program. If not, see <http://www.gnu.org/licenses/>.
  42. + */
  43. +package handlers.voicedcommandhandlers;
  44. +
  45. +import com.l2jserver.extensions.L2JTranslator;
  46. +import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
  47. +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  48. +
  49. +public class NoobHelper implements IVoicedCommandHandler
  50. +{
  51. + private static final String[] VOICED_COMMANDS =
  52. + {
  53. + "locate","translate","endTranslation"
  54. + };
  55. +
  56. +
  57. + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
  58. + {
  59. + if(command.contains("locate"))
  60. + L2JTranslator.locatePlayer(activeChar);
  61. + else
  62. + L2JTranslator.generateSession(command, activeChar, params);
  63. + return true;
  64. + }
  65. +
  66. +
  67. + public String[] getVoicedCommandList()
  68. + {
  69. + return VOICED_COMMANDS;
  70. + }
  71. +}
  72. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement