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

briancell.exe deleted

Discussion in 'Facepalm' started by ethaniccc, Mar 9, 2020.

  1. ethaniccc

    ethaniccc Baby Zombie

    Messages:
    189
    GitHub:
    ethaniccc
    (Yes I typed "briancell" instead of "braincell" on purpose)

    Ok, ok, so basiclly I keep getting this error and I don't know why...
    Code:
    Fatal error: Declaration of ethaniccc\AltFinder\Main::onCommand(ethaniccc\AltFinder\CommandSender $sender, pocketmine\command\Command $command, string $label, array $args): bool must be compatible with pocketmine\plugin\PluginBase::onCommand(pocketmine\command\CommandSender $sender, pocketmine\command\Command $command, string $label, array $args): bool in C:\Users\schoo\OneDrive\Desktop\skyline_network\plugintest2\plugins\AltFinder\src\ethaniccc\AltFinder\Main.php on line 56
    [16:59:53] [Server thread/EMERGENCY]: An unrecoverable error has occurred and the server has crashed. Creating a crash dump
    [16:59:53] [Server thread/EMERGENCY]: Please upload the "C:\Users\schoo\OneDrive\Desktop\skyline_network\plugintest2\crashdumps/Mon_Mar_9-16.59.53-CDT_2020.log" file to the Crash Archive and submit the link to the Bug Reporting page. Give as much info as you can.
    This is my code:
    PHP:
    <?php

    declare(strict_types=1);

    namespace 
    ethaniccc\AltFinder;

    use 
    pocketmine\plugin\PluginBase;

    use 
    pocketmine\Server;
    use 
    pocketmine\Player;
    use 
    pocketmine\command\Command;

    use 
    pocketmine\utils\Terminal;
    use 
    pocketmine\utils\TextFormat;
    use 
    pocketmine\utils\Utils;

    class 
    Main extends PluginBase{
        
        public function 
    onEnable(){
            
    $this->getLogger()->info(TextFormat::YELLOW "Checking to see if the server is authorized...");
            
    $filename 'key.txt';
            if(
    file_exists($filename)){
                
    $this->getLogger()->info(TextFormat::GREEN "This server is authorized!");
            } else {
                
    $this->getLogger()->warning(TextFormat::RED "I am sorry, but you are not allowed to use this plugin!");
                
    $this->getServer()->shutdown();
            }
        }
        
        public function 
    onCommand(CommandSender $senderCommand $commandstring $label, array $args) : bool {
            switch (
    $command->getName()){
                case 
    "alt":
                if(empty(
    $args[0])){
                    if(
    $sender instanceof Player){
                        
    $sender->sendMessage(TextFormat::RED "Usage: /alt");
                        return 
    true;
                    } else {
                        
    $this->getLogger()->info(TextFormat::RED "Usage: /alt <player>");
                        return 
    true;
                    }
                }
                if(
    $args[0] instanceof Player){
                    if(
    $sender instanceof Player){
                        
    $sender->sendMessage(TextFormat::RED TextFormat::BOLD "Oops, this plugin is still in development lmaooooo");
                        
    $this->getLogger()->info(TextFormat::RED TextFormat::BOLD "hey idot start coding plugin");
                        return 
    true;
                    } else {
                        
    $this->getLogger()->info(TextFormat::RED TextFormat::BOLD "hey idot start coding plugin");
                        return 
    true;
                    }
                }
                break;
            }
        }
        
    }
    I have no idea what I'm doing wrong lmaoooo help plz now rn pls pls pls TTYTYTYTYTY
    (Sorry for acting so immature lol)
     
  2. ethaniccc

    ethaniccc Baby Zombie

    Messages:
    189
    GitHub:
    ethaniccc
    omg omg i just figured it out i was forgetting:

    use pocketmine\command\Command;
    use pocketmine\command\CommandSender;
    use pocketmine\command\ConsoleCommandSender;
    use pocketmine\command\CommandExecutor;

    omg i want to delete all my braincells omgggggg LMAOOOO
     
  3. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    hehe take this :facepalm:
     
  4. ethaniccc

    ethaniccc Baby Zombie

    Messages:
    189
    GitHub:
    ethaniccc
    ikr i was such an idiot LOL
     
  5. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    Waiting to see the plugin.
     
  6. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    No delete your "briancells"
     
  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.