I have a Minecraft sever running that gets started automatically using the init.d scripts. Now I want to be able to give myself admin privileges but I need to send commands to the server. How can I do that without stopping it and running it manually?
3 Answers
When you ssh, you need to pass a -t option to allow screen to work. Or you could add your username to the ops.txt file.
But, what you really want is a full-featured bells-and-whistles script that uses screen to interact with the Minecraft server. Check out Minecraft Sheller. I think it provides what you want and more.
If you get
Cannot open your terminal '/dev/pts/0' - please check.
use
sudo -u minecraft
script '/dev/null'
screen -r
I ended up just calling sudo /etc/init.d/minecraft stop
then starting the server java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
and opping my player and starting it again with sudo /etc/init.d/minecraft start
Cannot open your terminal '/dev/pts/0' - please check.
Even if I su to minecraft and try to screen -r