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

Plugin Error

Discussion in 'Development' started by EliteRedshift, Jul 20, 2019.

  1. EliteRedshift

    EliteRedshift Creeper

    Messages:
    2
    GitHub:
    eliteredshift
    Hi there, so I have been trying to upload an old UHC plugin to my server and I updated the API but everytime I go to put it on my server it crashes and gives me this crash dump error.

    PHP:
     Declaration of UHCReload\Main::onCommand(pocketmine\command\CommandSender $senderpocketmine\command\Command $cmd$label, array $argsmust be compatible with pocketmine\plugin\PluginBase::onCommand(pocketmine\command\CommandSender $senderpocketmine\command\Command $commandstring $label, array $args): bool
     
  2. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    It wont magically work if you only change the api version, the api version is bumped for a reason.

    The fix is simple, change
    PHP:
    onCommand(pocketmine\command\CommandSender $senderpocketmine\command\Command $cmd$label, array $args)
    to
    PHP:
    onCommand(pocketmine\command\CommandSender $senderpocketmine\command\Command $commandstring $label, array $args): bool
    However im pretty sure more error will popup
     
  3. EliteRedshift

    EliteRedshift Creeper

    Messages:
    2
    GitHub:
    eliteredshift
    Ok, i just tried it and this message popped up.

    Declaration of UHCReload\Main::eek:nCommand(UHCReload\pocketmine\command\CommandSender $sender, UHCReload\pocketmine\command\Command $command, string $label, array $args): bool must be compatible with pocketmine\plugin\PluginBase::eek:nCommand(pocketmine\command\CommandSender $sender, pocketmine\command\Command $command, string $label, array $args): bool
     
  4. Eren5960

    Eren5960 Spider Jockey

    Messages:
    27
    GitHub:
    Eren5960
    You are using namespaces wrong, send full code
     
  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.