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

PluginCommand issue

Discussion in 'Help' started by esh123cookie, Apr 25, 2022.

  1. esh123cookie

    esh123cookie Baby Zombie

    Messages:
    104
    GitHub:
    esh123cookie
    Hi everyone, I'm experiencing some issues with some of my older code. I haven't worked on this stuff in a while and it started to give me errors. I'm not sure how to fix this certain one so I have come to pmmp forums for help.

    error:
    class \commands\essentials\Jump may not inherit from final class (pocketmine\command\PluginCommand) in phar:///server/server-data/plugins

    code:
    PHP:
    use pocketmine\command\CommandSender;
    use 
    pocketmine\command\PluginCommand;
    use 
    pocketmine\player\Player;
    use 
    pocketmine\utils\TextFormat as TF;
    use 
    pocketmine\entity\Effect;
    use 
    pocketmine\entity\EffectInstance;
    use 
    pocketmine\level\sound\PopSound;

    class 
    Jump extends PluginCommand {

        private 
    $owner;

        public function 
    __construct(string $nameMain $owner)
        {
            
    parent::__construct($name$owner);
            
    $this->owner $owner;
            
    $this->setPermission("jump.use");
            
    $this->setDescription("Activates jump boost");
        }
    If someone could help me with solving this it would be greatly appreciated thank you.
     
  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.