Package com.l2jfrozen.gameserver.handler

Examples of com.l2jfrozen.gameserver.handler.IAdminCommandHandler


        else
        {
          command = _command;
        }

        IAdminCommandHandler ach = AdminCommandHandler.getInstance().getAdminCommandHandler(command);

        if(ach == null)
        {
          if(activeChar.isGM())
          {
            activeChar.sendMessage("The command " + command + " does not exists!");
          }

          _log.warning("No handler registered for admin command '" + command + "'");
          return;
        }

        if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel()))
        {
          activeChar.sendMessage("You don't have the access right to use this command!");
          if(Config.DEBUG)
          {
            _log.warning("Character " + activeChar.getName() + " tried to use admin command " + command + ", but doesn't have access to it!");
          }
          return;
        }

        if(Config.GMAUDIT)
        {
          GMAudit.auditGMAction(activeChar.getName()+" ["+activeChar.getObjectId()+"]", command, (activeChar.getTarget() != null?activeChar.getTarget().getName():"no-target"),_command.replace(command, ""));
         
        }

        ach.useAdminCommand(_command, activeChar);
      }
      else if(_command.equals("come_here") && activeChar.isGM())
      {
        comeHere(activeChar);
      }
View Full Code Here


      _log.log(Level.WARNING, "Character " + activeChar.getName() + " tried to use admin command " + _command + ", but doesn't have access to it!");
      return;
    }

    //gets the Handler of That Commmand
    IAdminCommandHandler ach = AdminCommandHandler.getInstance().getAdminCommandHandler(_command);

    //if handler is valid we Audit and use else we notify in console.
    if(ach != null)
    {
      if(Config.GMAUDIT)
      {
        GMAudit.auditGMAction(activeChar.getName()+" ["+activeChar.getObjectId()+"]", _command, (activeChar.getTarget() != null?activeChar.getTarget().getName():"no-target"));
       
      }
     
      ach.useAdminCommand(_command, activeChar);
    }
    else
    {
      activeChar.sendMessage("The command " + _command + " doesn't exists!");
      _log.log(Level.WARNING, "No handler registered for admin command '" + _command + "'");
View Full Code Here

TOP

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

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.