1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

run command as player or console

Discussion in 'Plugin Help' started by WylSmart, May 14, 2020.

  1. WylSmart

    WylSmart Slime

    Messages:
    93
    PHP:
            case 9:
                if(
    $sender->hasPermission("coreui.pl")) {
                
    $command "pl" ;
                
    $this->getServer()->getCommandMap()->dispatch($sender$command);
                 return 
    true;
                   }else{
                       
    $sender->sendMessage("§cУ вас недостаточно прав для использования этой команды");
                       return 
    true;
                   }
            break;    
    how to make the team run to get a list of plugins /pl for the player, and issue a /setgroup {player} vip ?

    above is my code that executes commands within the game...

    $server->dispatchCommand(new ConsoleCommandSender(), 'say abc Hello'); <<no work
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.