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

Class not found

Discussion in 'Development' started by Jonas, May 25, 2017.

  1. Jonas

    Jonas Baby Zombie

    Messages:
    192
    When i use a command then i will got a message in the console. In the error says the console that a class not found is. The class is uCore\C but i havent a class with that name
     
  2. XdmingXD

    XdmingXD Baby Zombie

    Messages:
    158
    GitHub:
    xdmingxd
    Please show us your code or we can't help you
     
    SalmonDE likes this.
  3. Jonas

    Jonas Baby Zombie

    Messages:
    192
    PHP:
    if(strtolower($cmd->getName() === "nick")){
                if(
    $sender->isOP() || $sender->hasPermission("nick.cmd")){
                    if(
    $sender instanceof Player){
                        
    $nick $this->RandomNick();
                        
    $this->refreshNicks();
                        
    $config->set(strtolower($sender->getName()), $nick);
                        
    $config->save();
                        
    $skins = [];
                        
    $server $this->getServer();
                        
    $players $server->getOnlinePlayers();
                        
    $selected $players[array_rand($players)];
                        
    $skin $selected->getSkinData();
                        
    $skinId $selected->getSkinId();
                        
    $sender->setSkin($skin$skinId);
                        
    $sender->sendMessage($this->prefix." Dein Nick ist "C::GOLD.$nick.C::WHITE." mach ".C::GOLD."/unnick".C::WHITE." um dich zu entnicken");
                        
    $sender->sendMessage($this->prefix." Falls der Nick nicht kommt nochmal §6/nick machen");
                    } else {
                        
    $sender->sendMessage("Benutze den command ingame");
                    }
                }
            }
     
  4. Awzaw

    Awzaw Zombie Pigman Poggit Admin

    Messages:
    726
    GitHub:
    awzaw
    looks like you are missing:
    Code:
    use pocketmine\utils\TextFormat as C;
     
    jasonwynn10, Kyd and SalmonDE like this.
  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.