Issue Commands to Bukkit from Java program?

Discussion in 'Bukkit Discussion' started by ghostsoldier23, Apr 13, 2012.

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

    ghostsoldier23

    I'm trying to make myself a small Java app that runs Bukkit internally in another process. I can get the output using Process.getInputStream(), and I have used Process.getOuputStream() before to print commands to System.in on another running process, but this isn't working with the Bukkit process.

    Every command I write to the process output stream appears to have no effect on Bukkit.

    Does Bukkit not use System.in to listen for commands? If not, is there any other method to achieving this goal?
     
  2. Offline

    Tanite

    I use the linux 'screen' command to run MC, and I send a save-all command to the server every 5 minutes. It works fine. Here's my cron entry:

    */5 * * * * screen -S minecraft -p 0 -X stuff "`printf "save-all\r"`";

    Note that the screen session I run MC in is named "minecraft". That is set in the startup script. I can send pretty much any command to the console via that and I have done so for various things in the past.
     
  3. Offline

    ghostsoldier23

    Ah well I'm on Windows so... Any Java-based solutions? I <3 Java.

    I just don't understand how it can accept input from the command line in any way other than through STDIN.
     
  4. Offline

    Xenarthran

Thread Status:
Not open for further replies.

Share This Page