Package com.l2jfrozen.gameserver.handler

Examples of com.l2jfrozen.gameserver.handler.IVoicedCommandHandler


      }
      else if (_command.startsWith("voiced_"))
      {
      String command = _command.split(" ")[0];

      IVoicedCommandHandler ach = VoicedCommandHandler.getInstance().getVoicedCommandHandler(_command.substring(7));

      if (ach == null)
      {
      activeChar.sendMessage("The command " + command.substring(7) + " does not exist!");

      _log.info("No handler registered for command '" + _command + "'");
      return;
      }
        }
      else if (_command.startsWith("voice "))
      {
         //only voice commands allowed in bypass
        if (_command.length() > 7
            && _command.charAt(6) == '.')
        {
          final String vc, vparams;
          final int endOfCommand = _command.indexOf(" ", 7);
          if (endOfCommand > 0)
          {
            vc = _command.substring(7, endOfCommand).trim();
            vparams = _command.substring(endOfCommand).trim();
          }
          else
          {
            vc = _command.substring(7).trim();
            vparams = null;
          }
          if (vc.length() > 0)
          {
            final IVoicedCommandHandler vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(vc);
            if (vch != null)
              vch.useVoicedCommand(vc, activeChar, vparams);
          }
        }
      }
      else if(_command.startsWith("Quest "))
      {
View Full Code Here


               break;
      case ALL:
        if(_text.startsWith("."))
        { 
          StringTokenizer st = new StringTokenizer(_text);
          IVoicedCommandHandler vch;
          String command = "";
          String target = "";

          if(st.countTokens() > 1)
          {
            command = st.nextToken().substring(1);
            target = _text.substring(command.length() + 2);
            vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(command);
          }
          else
          {
            command = _text.substring(1);
            if(Config.DEBUG)
            {
              _log.info("Command: " + command);
            }
            vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(command);
          }

          if(vch != null)
          {
            vch.useVoicedCommand(command, activeChar, target);
            break;
          }
        }
       
        for(L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.handler.IVoicedCommandHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.