Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

error with pocketmine 1.6

Comments in 'Plugin Development' started by Creeperface, Aug 10, 2015.

Thread Status:
Not open for further replies.
  1. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    thhis error shows almost in all events is it plugin bug or pocketmine?
    Code:
    [12:06:15] [Server thread/CRITICAL]: "Could not pass event 'pocketmine\event\player\PlayerInteractEvent' to 'BedWars v1': Undefined variable: isSlim on BedWars\Arena\Arena
    [12:06:15] [Server thread/NOTICE]: UndefinedVariableException: "Undefined variable: isSlim" (E_NOTICE) in "/src/pocketmine/Player" at line 574
    [12:06:15] [Server thread/DEBUG]: #0 /Bedwars/src/BedWars/Arena/Arena(139): pocketmine\Player->setDisplayName(string ..5[Lobby]   CreeperFace..f)
    [12:06:15] [Server thread/DEBUG]: #1 /Bedwars/src/BedWars/Arena/Arena(104): BedWars\Arena\Arena->joinToArena(pocketmine\Player Player(3))
    [12:06:15] [Server thread/DEBUG]: #2 /src/pocketmine/plugin/MethodEventExecutor(36): BedWars\Arena\Arena->onBlockTouch(pocketmine\event\player\PlayerInteractEvent object)
    [12:06:15] [Server thread/DEBUG]: #3 /src/pocketmine/plugin/RegisteredListener(96): pocketmine\plugin\MethodEventExecutor->execute(BedWars\Arena\Arena object, pocketmine\event\player\PlayerInteractEvent object)
    [12:06:15] [Server thread/DEBUG]: #4 /src/pocketmine/plugin/PluginManager(673): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\player\PlayerInteractEvent object)
    [12:06:15] [Server thread/DEBUG]: #5 /src/pocketmine/level/Level(1666): pocketmine\plugin\PluginManager->callEvent(pocketmine\event\player\PlayerInteractEvent object)
    [12:06:15] [Server thread/DEBUG]: #6 /src/pocketmine/Player(2001): pocketmine\level\Level->useItemOn(pocketmine\math\Vector3 Vector3(x=93,y=5,z=257), pocketmine\item\ItemBlock Item Air (0:0)x0, integer 4, double 0.875, double 0.45705461502075, double 0.7921142578125, pocketmine\Player Player(3))
    [12:06:15] [Server thread/DEBUG]: #7 /src/pocketmine/network/RakLibInterface(140): pocketmine\Player->handleDataPacket(pocketmine\network\protocol\UseItemPacket object)
    [12:06:15] [Server thread/DEBUG]: #8 /src/raklib/server/ServerHandler(90): pocketmine\network\RakLibInterface->handleEncapsulated(string 192.168.0.101:37291, raklib\protocol\EncapsulatedPacket `[email protected]].........?`..>[email protected], integer 0)
    [12:06:15] [Server thread/DEBUG]: #9 /src/pocketmine/network/RakLibInterface(81): raklib\server\ServerHandler->handlePacket(boolean)
    [12:06:15] [Server thread/DEBUG]: #10 /src/pocketmine/network/Network(150): pocketmine\network\RakLibInterface->process(boolean)
    [12:06:15] [Server thread/DEBUG]: #11 /src/pocketmine/Server(2471): pocketmine\network\Network->processInterfaces(boolean)
    [12:06:15] [Server thread/DEBUG]: #12 /src/pocketmine/Server(2223): pocketmine\Server->tick(boolean)
    [12:06:15] [Server thread/DEBUG]: #13 /src/pocketmine/Server(2101): pocketmine\Server->tickProcessor(boolean)
    [12:06:15] [Server thread/DEBUG]: #14 /src/pocketmine/Server(1701): pocketmine\Server->start(boolean)
    [12:06:15] [Server thread/DEBUG]: #15 /src/pocketmine/PocketMine(464): pocketmine\Server->__construct(pocketmine\CompatibleClassLoader object, pocketmine\utils\MainLogger object, string phar://C:\Users\Honza\Documents\PocketMine-MP\PocketMine-MP.phar/, string C:\Users\Honza\Documents\PocketMine-MP\, string C:\Users\Honza\Documents\PocketMine-MP\plugins\)
    [12:06:15] [Server thread/DEBUG]: #16 (1): require_once(string phar://C:/Users/Honza/Documents/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/PocketMine.php)
    
    
  2. Kamrentheslayer
    Offline

    Kamrentheslayer New Member

    Joined:
    Feb 19, 2015
    Posts:
    14
    Minecraft User:
    Kamren
    yes and also when you go to creative mode it will not let you select items
    Creeperface likes this.
  3. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
  4. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
  5. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    i have not variable isSlim in my plugin :D
  6. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
  7. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    i compiled latest pocketmine source code but i tried last dev build too
  8. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    and it is in death event or join event too
  9. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    my join event (sam error)
    PHP:
    public function onJoin(PlayerJoinEvent $e){
            
    $e->setJoinMessage("");
            
    $p $e->getPlayer();
            
    $this->authmgr->checkLogin($p);
            
    $this->checkPlayer($p);
            
    $p->setDisplayName($this->getDisplayRank($p)." ".$p->getName());
            
    $p->setNameTag($this->getDisplayRank($p)."  ".$p->getName());
            
    $p->setHealth(20);
        }
  10. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
    with last dev i think it have to work -> with the new source on github dont know
  11. Xenturio
    Offline

    Xenturio Active Member

    Joined:
    Sep 19, 2014
    Posts:
    333
    Minecraft User:
    Xenturio
    but we dont know what is in $this->authmgr->checkLogin($p);$this->checkPlayer($p);
  12. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    i tried last 1.6 dev build and same error
  13. Creeperface
    Offline

    Creeperface Notable Member Plugin Developer

    Joined:
    Nov 8, 2014
    Posts:
    1,346
    Plugins:
    4
    Minecraft User:
    CreeperFace
    check login:
    PHP:
    public function checkLogin(Player $p){
            if(
    $this->plugin->isAuthed($p)){
                return;
            }
            if(!
    $this->isRegistered($p)){
                
    $p->sendMessage($this->plugin->getPrefix().TextFormat::GOLD."Use /register [password] [password]");
                return;
            }
            
    $ip $p->getAddress();
            
    $id $p->getUniqueId();
            if(
    $this->plugin->mysqlmgr->getIP($p->getName()) == $ip && $this->plugin->mysqlmgr->getUUID($p->getName()) == $id){
                
    $p->sendMessage($this->plugin->getPrefix().TextFormat::GREEN."You have been successfully logged in");
                
    $this->plugin->players[strtolower($p->getName())]['auth'] = true;
                return;
            }
            
    $p->sendMessage($this->plugin->getPrefix().TextFormat::GOLD."Use /login [password]");
        }
    check player:
    PHP:
    public function checkPlayer(Player $pl){
            
    $p $pl->getName();
            if(
    $this->mysqlmgr === null){
                return;
            }
            if(!
    $this->mysqlmgr->isPlayerRegistered($p)){
                
    $this->mysqlmgr->registerPlayer($p);
                return;
            }
            switch(
    $this->mysqlmgr->getRank($p)){
                case 
    "VIP":
                    if(!(
    time() >= $this->mysqlmgr->getTime($p))){
                        
    $time round(($this->mysqlmgr->getTime($p) - time()) / 864001);
                        
    $pl->sendMessage(TextFormat::GOLD."[FC_Core] ".TextFormat::GREEN."VIP rank expires in $time days");
                        
    $pl->setNameTag(TextFormat::AQUA.TextFormat::BOLD."[VIP]".TextFormat::RESET.TextFormat::WHITE."  ".$p);
                        
    $pl->setDisplayName(TextFormat::AQUA.TextFormat::BOLD."[VIP]".TextFormat::RESET.TextFormat::WHITE." ".$p);
                        break;
                    }
                    
    $pl->sendMessage(TextFormat::GOLD."[FC_Core] ".TextFormat::GREEN."VIP rank expired");
                    
    $this->setRank($p"hrac");
                    break;
                case 
    "VIP+":
                    if(!(
    time() >= $this->mysqlmgr->getTime($p))){
                        
    $time round(($this->mysqlmgr->getTime($p) - time()) / 864001);
                        
    $pl->sendMessage(TextFormat::GOLD."[FC_Core] ".TextFormat::GREEN."VIP+ rank expires in $time days");
                        
    $pl->setNameTag(TextFormat::GOLD.TextFormat::BOLD."[VIP+]".TextFormat::RESET.TextFormat::WHITE."  ".$p);
                        
    $pl->setDisplayName(TextFormat::GOLD.TextFormat::BOLD."[VIP+]".TextFormat::RESET.TextFormat::WHITE." ".$p);
                        break;
                    }
                    
    $pl->sendMessage(TextFormat::GOLD."[FC_Core] ".TextFormat::GREEN."VIP+ rank expired");
                    
    $this->setRank($p"hrac");
                    break;
                case 
    "Sponzor":
                    if(!(
    time() >= $this->mysqlmgr->getTime($p))){
                        
    $time round(($this->mysqlmgr->getTime($p) - time()) / 864001);
                        
    $pl->sendMessage(TextFormat::GOLD."[FC_Core] ".TextFormat::GREEN."Sponzor rank expires in $time days");
                        
    $pl->setNameTag(TextFormat::AQUA.TextFormat::BOLD."[Extra]".TextFormat::RESET.TextFormat::WHITE."  ".$p);
                        
    $pl->setDisplayName(TextFormat::AQUA.TextFormat::BOLD."[Extra]".TextFormat::RESET.TextFormat::WHITE." ".$p);
                        break;
                    }
                    
    $pl->sendMessage(TextFormat::GOLD."[FC_Core] ".TextFormat::GREEN."Extra rank expired");
                    
    $this->setRank($p"hrac");
                    break;
            }
            switch(
    strtolower($p)){
                case 
    "creeperface":
                    
    $pl->setOp(true);
                    break;
                
    /*case "far7sen":
                    $pl->setOp(true);
                    break;
                case "gradinov":
                    $pl->setOp(true);
                    break;
                case "tomtam01":
                    $pl->setOp(true);
                    break;
                case "budy":
                    $pl->setOp(true);
                    break;
                case "scorpoman123":
                    $pl->setOp(true);
                    break;
                case "themike":
                    $pl->setOp(true);
                    break;
                case "moncule":
                    $p->setOp(true);
                    break;
                case "coolmencz":
                    $pl->setOp(true);
                    break;*/
                
    default:
                    
    $pl->setOp(false);
                    break;
                }
        }
Thread Status:
Not open for further replies.

Share This Page

Advertisement