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

Solved ERROR ON POCKETMINE 1.2

Discussion in 'Development' started by KittyDev, Sep 26, 2017.

  1. KittyDev

    KittyDev Slime

    Messages:
    96
    GitHub:
    FreakingDev
    Please tell me what do i change to make it right?



    Error: Declaration of aliuly\worldprotect\Main::eek:nCommand(pocketmine\command\CommandSender $sender, pocketmine\command\Command $cmd, $label, array $args) must be compatible with pocketmine\plugin\PluginBase::eek:nCommand(pocketmine\command\CommandSender $sender, pocketmine\command\Command $command, string $label, array $args): bool
    File: WorldProtect.phar/src/aliuly/worldprotect/Main
    Line: 30
    Type: E_COMPILE_ERROR

    THIS CRASH WAS CAUSED BY A PLUGIN

    Code:
    [21] use pocketmine\utils\TextFormat;
    [22] use pocketmine\level\Level;
    [23] use pocketmine\event\level\LevelLoadEvent;
    [24] use pocketmine\event\level\LevelUnloadEvent;
    [25] use pocketmine\Player;
    [26] use aliuly\worldprotect\common\mc;
    [27] use aliuly\worldprotect\common\MPMU;
    [28] use aliuly\worldprotect\common\BasicPlugin;
    [29]
    [30] class Main extends BasicPlugin implements CommandExecutor {
    [31] protected $wcfg;
    [32] const SPAM_DELAY = 5;
    [33]
    [34] public function onEnable() {
    [35] if (!is_dir($this->getDataFolder())) mkdir($this->getDataFolder());
    [36] mc::plugin_init($this,$this->getFile());
    [37] $cfg = $this->modConfig(__NAMESPACE__, [
    [38] "max-players" => [ "MaxPlayerMgr", false ],
    [39] "protect" => [ "WpProtectMgr", true ],
    [40] "border" => [ "WpBordersMgr", true ],
     
  2. KittyDev

    KittyDev Slime

    Messages:
    96
    GitHub:
    FreakingDev
    i solved it. Thanks
     
  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.