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

Crashed Plugin rankUp

Discussion in 'Development' started by AffanStarPure, Aug 18, 2017.

Thread Status:
Not open for further replies.
  1. AffanStarPure

    AffanStarPure Baby Zombie

    Messages:
    106
    GitHub:
    AffanStarPure
    Code:
    PocketMine-MP Crash Dump Fri Aug 18 09:07:57 CEST 2017
    
    Error: Declaration of rankup\command\RankUpCommand::getPlugin() must be compatible with pocketmine\command\PluginIdentifiableCommand::getPlugin(): pocketmine\plugin\Plugin
    File: RankUp-master/src/rankup/command/RankUpCommand
    Line: 10
    Type: E_COMPILE_ERROR
    
    THIS CRASH WAS CAUSED BY A PLUGIN
    BAD PLUGIN: RankUp v0.4.0
    
    Code:
    [1] <?php
    [2] namespace rankup\command;
    [3] 
    [4] use pocketmine\command\Command;
    [5] use pocketmine\command\CommandSender;
    [6] use pocketmine\command\PluginIdentifiableCommand;
    [7] use pocketmine\Player;
    [8] use rankup\RankUp;
    [9] 
    [10] class RankUpCommand extends Command implements PluginIdentifiableCommand{
    [11]     private $main;
    [12]     public function __construct(RankUp $main){
    [13]         parent::__construct("rankup", "Get all the ranks.", "/rankup", ["ru"]);
    [14]         $this->main = $main;
    [15]     }
    [16]     public function execute(CommandSender $sender, string $label, array $args): bool{
    [17]         if ($sender instanceof Player && count($args) == 0 || !$sender->hasPermission("rankup.admin")) {
    [18]             if ($sender->hasPermission("rankup.rankup")) {
    [19]                 $nextRank = $this->getPlugin()->getRankStore()->getNextRank($sender);
    [20]                 //$sender->sendMessage($nextRank->getName());
    
    Backtrace:
    
    PocketMine-MP version: 1.6.2dev #311 [Protocol 113; API 3.0.0-ALPHA7]
    Git commit: 7d777510c5cee564bdd9f6d1e55d2d6c04e7de16
    uname -a: Linux fr24.server.pro 3.14.32-xxxx-grs-ipv6-64 #6 SMP Wed Jan 20 17:52:44 CET 2016 x86_64
    PHP Version: 7.0.9
    Zend version: 3.0.0
    OS : Linux, linux
    
    Loaded plugins:
    DevTools 1.12.1 by PocketMine Team for API(s) 3.0.0-ALPHA7
    AdvancedKits 5.2.0 by luca28pet for API(s) 3.0.0-ALPHA7
    RankUp 0.4.0 by Falkirks for API(s) 3.0.0-ALPHA7
    
    Why still keep crashed I changed code..
     
  2. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    There are still some typehints you missed.
     
  3. AffanStarPure

    AffanStarPure Baby Zombie

    Messages:
    106
    GitHub:
    AffanStarPure
    How I find missed code again?
     
  4. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    It tells you in the crash dump.
     
    HimbeersaftLP and SOFe like this.
  5. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    This forum is not for helping you to modify other plugins when you can't even read a crash dump.
     
Thread Status:
Not open for further replies.
  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.