[ADMIN] MCSignOnDoor 1.9 - So Your Server Can Say "Gone Fishin' Back in Five!"

Discussion in 'Bukkit Tools' started by tustin2121, Mar 16, 2011.

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


    Sorry, Im guess im kind of a noob to java, but how exactly do i run it?
  2. Offline


    There's an example in a spoiler in the original post. :)
  3. Offline


    *facepalm* Alright, one question answered, one to go: Any ideas on ways i could set this up so it runs automatically after my server stops running?
  4. Offline


    Well, if you start your server via a batch file / shell script (which is likely, as it's easier to just double click that file instead of typing in all the command line arguments needed every time) you can edit the script file to include the command to run McSod after the Minecraft server stops. This way, when the server stops, it goes right into McSod. For example (pulling from the examples here, though the script file I run doesn't have the BINDIR thing):

    SET BINDIR=%~dp0
    CD /D "%BINDIR%"
    "%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    "%ProgramFiles%\Java\jre6\bin\java.exe" -jar MCSignOnDoor.jar -m "Message Here"
    Shell script:
    #! /bin/sh
    BINDIR="$(dirname "$(readlink -fn "$0")")"
    cd "$BINDIR"
    java -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    java -jar MCSignOnDoor.jar -m "Message Here"
    (This is assuming you keep MCSignOnDoor.jar in the same folder as your craftbukkit.jar)
    Just remember you have to stop McSod before you can start the Minecraft server again - they use the same port, and one can't run while the other is.
  5. Offline


  6. Offline


    My server has 3 ip's, how can i set it up so it uses the right ip?
  7. Offline


    That's kind of a neat tool there. If you come up with something to work with that, feel free to just post it here. :)

    .....How? I mean, how do you have 3 IP's? McSod makes the assumption that the IP of the computer it is running on is the IP players will try and connect to.

    Do they all point to the same server? Because in that case just starting it on the same server as Minecraft is usually running on should suffice.

    EDIT: Depending on what you have going there, I may have to release a new version to add an IP command line switch.
  8. Offline


    Dumptruckman says he might add mcsod compatability in his GUI!
  9. Offline


    I am on a windows server 2008, that server has 3 different ip's. the default is x.139 but my minecraft server runs on x.177. So if i start this .jar it runs on x.139. I hope this explains it more :)
  10. Offline


    That's awesome! :p Tell him he can contact me if he needs any help with it. :)

    From the sound of it, I'm gonna have to add another command line switch for IP address.

    Have you tried connecting to it as it is right now? Does McSod respond properly or at all? Does it get caught by another service, or refused connection? I ask because the JavaDocs seem to suggest that setting up a ServerSocket without an IP address specified means that it listens on all IP addresses, whereas specifying one sets it up to only listen on that IP. (I find it odd that it says "local address", btw.)
  11. Offline


    If i run it the minecraft server just continue running.
    And if i connect to the default ip x.139 it says the message i setup in -m .
    So a -ip <iphere> will work fine i think :).
    And thx for looking at it.
  12. Offline


    See if this works for you: McSod 1.3 PreRelease (Link Broken)
    (PreRelease because I can't test if this works without your help to test the situation you have.)
    java -jar MCSignOnDoor.1.3_pre.jar -ip <ip>
  13. Offline


    works! :cool:
  14. Offline


    You dont know how long I have waited for something like this.

    Thank you SO much for making this!
    tustin2121 likes this.
  15. Offline


    Excellent! Releasing then. :p
  16. Offline


    Superb plug-in! Keep up the good work! Absolutely brilliant!
    tustin2121 likes this.
  17. Offline


    LOVE IT!, Worked first try my message is
    Dont Blaim Me, The Creepers Did It!!
    tustin2121 likes this.
  18. Offline


    Will this work for the current minecraft?
  19. Offline


    yea man its not a server plugin its a fake server that displays a message to the client when thay try to connect
  20. Offline


    Mine doesn't create any new folders/files/config's?
  21. Offline


    Probably a stupid question, but how do I stop it?

    Nvm, I read the rest of the thread. Excellent tool, thank you so much!
  22. Offline


    Whoo! Whats thiis :p This is nice xD
    tustin2121 likes this.
  23. Offline


    Source is now uploaded to GitHub for your forking pleasure (that sounded slightly wrong). Please abide by the Creative Commons BY-NC-SA 3.0 license, however.


    MCSignOnDoor is not a bukkit plugin (and hence not in the plugin list). It does not go into the plugin folder, but (well, anywhere, but usually) in the top level craftbukkit folder. It runs separately from craftbukkit - because it's supposed to run when craftbukkit is not. In fact, if it runs while craftbukkit is running, it will throw an error and exit (or if it doesn't, you set it up wrong).

    It will not create anything new (unless specifically told to create and use a log file with that command line switch).

    Version 1.4 is OUT!

    - Added support for minecraft color codes (see here)

    Thanks to FrozenBrain and his MessageChanger plugin for giving me the idea... and stealing his code. ;) His plugin is a complement to this program in that you can change the default messages sent to the clients while the server is running! Go check it out!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 12, 2016
  24. Offline


    Im now confused and don't know how to install it?
  25. Offline


    There is no installation, you only run it. Have you seen this post yet? Have you looked at the example spoiler in the original post?

    If none of those can help you, then I'll have to give you specific instruction. Before I can give specifc instructions, however, I need to know a couple things:
    • How do you run craftbukkit? Via the command line or via a script that you double click on?
    • Are you running craftbukkit on a Windows or Mac (or, I suppose, Linux, though I don't use Linux)?
  26. Offline


    I finally worked how to and this is awesome it is extremely helpful!
  27. Offline


    Excellent. Glad you enjoy it. :)
  28. Offline


    This is *exactly* what I needed!! You are a godsend!!

    and a gift for future thread readers, the result of an hour's worth of reading on google

    my killsign.sh (kills the screen session named mcaway - what i use for this program)
    procID=$( screen -list | grep mcaway | cut -f1 -d'.' | sed 's/\W//g')
    kill $procID;
    I run the killsign.sh script at the beginning of my script starting bukkit and I run your program at the end of my stop bukkit script
    here they are
    Show Spoiler
    my halt.sh -- used from the commandline for a quick server stop to fix a plugin or something
    screen -S bukkit -p 0 -X stuff "`printf "save-all\r"`";
    screen -S bukkit -p 0 -X stuff "`printf "stop\r"`";
    sleep 2;
    screen -dmS mcaway java -jar /home/minecraft/mc-server/MCSignOnDoor.jar -l /home/minecraft/mc-server/away.log -m "Server down shortly, it will be up again soon :)"
    my stop.sh, ran from cron for the nightly c10t map processing (mapupdate.sh), then cron runs start.sh again an hour later
    screen -S bukkit -p 0 -X stuff "`printf "say Going down in 5 minutes.\r"`";
    sleep 240;
    screen -S bukkit -p 0 -X stuff "`printf "say Going down in 60 seconds.\r"`";
    sleep 55;
    screen -S bukkit -p 0 -X stuff "`printf "say Going down in 5 seconds.\r"`";
    sleep 4;
    screen -S bukkit -p 0 -X stuff "`printf "save-all\r"`";
    screen -S bukkit -p 0 -X stuff "`printf "stop\r"`";
    sleep 2;
    screen -dmS mcaway java -jar /home/minecraft/mc-server/MCSignOnDoor.jar -l /home/minecraft/mc-server/away.log -m "Server down for nightly web map update";
    my start.sh for minecraft bukkit
    sleep 2;
    cd /home/minecraft/mc-server
    screen -dmS bukkit java -Xincgc -Xmx1G -jar craftbukkit-0.0.1-SNAPSHOT.jar
    MaliciousMan and tustin2121 like this.
  29. Offline


    How is MCSignOnDoor holding up for everyone struggling to transfer to the new update? Hopefully Notch hasn't again changed the login protocol again like he did a couple updates ago now. :p
  30. Offline


    Can't download it :(.
Thread Status:
Not open for further replies.

Share This Page