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

Solved Shutdown message

Discussion in 'Development' started by Jonas, Apr 26, 2017.

  1. Jonas

    Jonas Baby Zombie

    Messages:
    192
    How can i make a new server shutdown message(“§aserver closed“)
     
  2. XdmingXD

    XdmingXD Baby Zombie

    Messages:
    158
    GitHub:
    xdmingxd
    edit your pocketmine.yml
     
  3. Jonas

    Jonas Baby Zombie

    Messages:
    192
    No, i will it programm it
     
  4. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    PHP:
    function onDisable(){
    if(
    $this->getServer()->isRunning == false){
    foreach(
    $this->getServer()->getOnlinePlayers() as $pl){
    $pl->kick("§aserver closed"false);
    $this->getServer()->shutdown();
    }
    }
    }
    But I dont understand why you want make it using plugin and why just not edit pocketmine,yml
     
  5. Jonas

    Jonas Baby Zombie

    Messages:
    192
    Everbody can change the pocketmine.yml and i will make it self
     
  6. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    why reinvent the wheel?
     
  7. Jonas

    Jonas Baby Zombie

    Messages:
    192
    Thanks its works but how can i remove “Kicked by Admin! Reason:“
     
  8. Jonas

    Jonas Baby Zombie

    Messages:
    192
    Thanks for the tip
     
  9. McpeBooster

    McpeBooster Baby Zombie

    Messages:
    190
    GitHub:
    mcpebooster
    you must add a "false" to delet the “Kicked by Admin! Reason:“. example:
    PHP:
    $player->kick("test"false);
     
  10. Kyd

    Kyd Zombie Pigman

    Messages:
    678
    GitHub:
    boi1216
    read my code
    PHP:
    $pl->kick("§aserver closed"false);
    add "false" it return player is not kicked by admin
     
  11. McpeBooster

    McpeBooster Baby Zombie

    Messages:
    190
    GitHub:
    mcpebooster
    i know but he asked again :D
     
    Kyd likes this.
  12. Irish

    Irish Baby Zombie

    Messages:
    156
    GitHub:
    irishpacks
    Can't tell if you're being sarcastic or if you're genuinely serious. Anyways, I agree with him about why do something if it's already implemented? I had an argument similar to this, but it concerned titles.
     
    jasonwynn10 likes this.
  13. Jonas

    Jonas Baby Zombie

    Messages:
    192
    That was sarcastic
     
  14. EdwardHamHam

    EdwardHamHam Skeleton

    Messages:
    962
    GitHub:
    edwardhamham
    Only the person who owns the server and has access to its files can edit it. If everybody in the world can edit your pocketmine.yml, than you have got a really serious security problem, that's not with PocketMine.

    I just don't see why you want to go through all of the extra trouble is all.
     
    Kyd likes this.
  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.