Scripting help with Minecraft Server.

Discussion in 'Mac Programming' started by Spoonless, Apr 26, 2012.

  1. macrumors newbie

    Joined:
    Apr 26, 2012
    #1
    Hey guys, newbie here.

    I was wondering if someone could help me with a scripting problem I've been having.

    I recently installed a Bukkit Minecraft server, but for it to work properly, I need to first fire up my "Portmap" app to port forward, and then run the .command files to start the server. Everything works like a charm, but I've been trying to modify that .command file so that it opens Portmap AND starts the server (in that order, otherwise I guess the server wont start properly.)

    I have tried googling but to no avail.

    Here's the code from that .command file, from what I can tell it doesn't seem to be too complicated...

    Code:
    #!/bin/bash
    cd "`dirname "$0"`"
    java -Xmx1024M -Xms1024M -jar craftbukkit.jar nogui
    Any thoughts?
     
  2. macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #2
    Code:
    #!/bin/bash
    # change path to where you copied Portmap
    open "/Applications/Port Map.app/"
    # Give it a few seconds, comment it if not needed
    sleep 2
    cd "`dirname "$0"`"
    java -Xmx1024M -Xms1024M -jar craftbukkit.jar nogui
     

Share This Page