Examples of IVoicedCommandHandler


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

Examples of com.l2jfrozen.gameserver.handler.IVoicedCommandHandler

               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

Examples of l2p.gameserver.handler.IVoicedCommandHandler

      String command = fullcmd.split("\\s+")[0];
      String args = fullcmd.substring(command.length()).trim();
      if(command.length() > 0)
      {
        // then check for VoicedCommands
        IVoicedCommandHandler vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(command);
        if(vch != null)
        {
          vch.useVoicedCommand(command, activeChar, args);
          return;
        }
      }
      activeChar.sendMessage("Wrong command");
      return;
View Full Code Here

Examples of l2p.gameserver.handler.IVoicedCommandHandler

      else if(bypass.startsWith("user_"))
      {
        String command = bypass.substring(5).trim();
        String word = command.split("\\s+")[0];
        String args = command.substring(word.length()).trim();
        IVoicedCommandHandler vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(word);
        if(vch != null)
        {
          vch.useVoicedCommand(word, activeChar, args);
        }
        else
        {
          _log.warning("Unknow voiced command '" + word + "'");
        }
View Full Code Here

Examples of lineage2.gameserver.handler.voicecommands.IVoicedCommandHandler

      else if (bp.bypass.startsWith("user_"))
      {
        String command = bp.bypass.substring(5).trim();
        String word = command.split("\\s+")[0];
        String args = command.substring(word.length()).trim();
        IVoicedCommandHandler vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(word);
        if (vch != null)
        {
          vch.useVoicedCommand(word, activeChar, args);
        }
        else
        {
          _log.warn("Unknow voiced command '" + word + "'");
        }
View Full Code Here

Examples of lineage2.gameserver.handler.voicecommands.IVoicedCommandHandler

      String fullcmd = _text.substring(1).trim();
      String command = fullcmd.split("\\s+")[0];
      String args = fullcmd.substring(command.length()).trim();
      if (command.length() > 0)
      {
        IVoicedCommandHandler vch = VoicedCommandHandler.getInstance().getVoicedCommandHandler(command);
        if (vch != null)
        {
          vch.useVoicedCommand(command, activeChar, args);
          return;
        }
      }
      activeChar.sendMessage(new CustomMessage("common.command404", activeChar));
      return;
View Full Code Here

Examples of net.sf.l2j.gameserver.handler.IVoicedCommandHandler

                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);
          else
          {
            if (Config.DEBUG) _log.warning("No handler registered for bypass '"+command+"'");
          }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.