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

Change the "Server Is full" message

Comments in 'Plugin Development' started by TonyDroidd, Apr 24, 2015.

  1. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Use what?
  2. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    You function
    public function onKick(PlayerKickEvent $e){
    if($e->getReason() === "server full") {$e->setReason("The server is on a hunger strike.");
    }
    }
  3. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    *your
  4. RekkuzaRage
    Offline

    RekkuzaRage Active Member

    Joined:
    Apr 15, 2014
    Posts:
    251
    Minecraft User:
    RekkuzaRage
    I didn't know. Sorry. :/ Teach me your ways! Lol
    Also you can modify the server full messages or is it client side? I haven't tested it. Don't have 0.11.
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    It is clientside, but you can make it not client side using the methods mentioned above.
    RekkuzaRage likes this.
  6. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    Here is a code (haven't tested it)

    Attached Files:

    • CFM.zip
      File size:
      1.8 KB
      Views:
      25
    TonyDroidd likes this.
  7. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    I wrote it too fast. there might be errors, sorry If I did...
  8. TonyDroidd
    Offline

    TonyDroidd Active Member

    Joined:
    Sep 6, 2014
    Posts:
    180
    Minecraft User:
    TonyDroidd
    but i would extract the pocketmine-mp.phar
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    I deleted it because it won't work because it is wrong.
    iJoshuaHD and RekkuzaRage like this.
  10. TonyDroide
    Offline

    TonyDroide Active Member Plugin Developer

    Joined:
    Jun 5, 2015
    Posts:
    122
    Plugins:
    1
    Minecraft User:
    TonyDroidd
    I want the code xD
    That not work
  11. iksaku
    Offline

    iksaku Notable Member Plugin Developer

    Joined:
    Sep 2, 2013
    Posts:
    1,130
    Plugins:
    4
    Minecraft User:
    iksaku
    If you will use a custom "Hard Sent Message" then check for "KickEvent" and with the $event->getReason() check the string manually, and change it using $event->setreason()
    TonyDroide likes this.
  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    The message for kicking has been changed in PocketMine 1.5 due to translations support. Read the new code for kicking player when the server stops. I think it is something like disconnectReason.serverFull . Just search it on GitHub yourself :p

Share This Page

Advertisement