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

Kicked message did not displayed

Discussion in 'Development' started by romainbizet46, Feb 16, 2018.

  1. romainbizet46

    romainbizet46 Witch

    Messages:
    52
    I use this code on task.
    the player is well kicked but he does not get the message, why?
    PHP:
    $kickmsg "You are kicked";
    $player->kick($kickmsgfalse);
     
  2. di2134876

    di2134876 Spider Jockey

    Messages:
    29
    GitHub:
    dk1234987
    Could you show the task?
     
  3. romainbizet46

    romainbizet46 Witch

    Messages:
    52
    PHP:
    public  function onRun(int $currentTick){
            
    $core $this->core;
            foreach(
    $core->getServer()->getOnlinePlayers() as $player){
                if(
    $player->getPing() > $core->cfg->get("Max-Ping")){
                    
    $kickmsg $core->getConfig()->get("High-Ping-Message");
                    
    $player->kick($kickmsgfalse);
                }
            }
        }
     
  4. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    PHP:
    public function onRun(int $currentTick){
            
    $core $this->core;
            foreach(
    $core->getServer()->getOnlinePlayers() as $player){
                if(
    $player->getPing() > $core->cfg->get("Max-Ping")){
                    
    $kickmsg $core->getConfig()->get("High-Ping-Message");
                    
    $player->kick($kickmsgfalse);
                }
            }
     
  5. romainbizet46

    romainbizet46 Witch

    Messages:
    52
    ??
     
  6. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Copy the code and replace
     
  7. romainbizet46

    romainbizet46 Witch

    Messages:
    52
    No change
     
  8. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Maybe problem with config
     
  9. romainbizet46

    romainbizet46 Witch

    Messages:
    52
    Idk but the kick message is juste displayed in the console
     
  10. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    667
    Its probably a MCPE bug, #blamemojang
     
  11. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
  12. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    It used to be a bug (with pocketmine), it's been months ever since it had been fixed.
     
    OnTheVerge likes this.
  13. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    But why is he still present in his case?
     
  14. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    Try lastest pmmp version
     
  15. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    it shouldn't be possible for him to get the old "race condition" bug. Afaik that very old raklib version is long incompatible with pmmp and there are version checks now.
     
    xXNiceAssassinlo YT likes this.
  16. armagadon159753

    armagadon159753 Zombie

    Messages:
    217
    GitHub:
    armagadon159753
    I have tester myself and I have the same issue but juste when I joining my server and not when I m already connected

    Tested with the last pmmp commit
     
    xXNiceAssassinlo YT likes this.
  17. xXNiceAssassinlo YT

    xXNiceAssassinlo YT Zombie Pigman

    Messages:
    499
    GitHub:
    xXNiceYT
    English arm:
    I tested it myself and I have the same issue but just when I join my server and not when I m already connected
     
  18. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    might be a client problem
    @OP when are you kicking your players?
     
  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.