General information: I have a Minecraft server running in the basement for some friends that is running for a couple months now. We were using TeamViewer to input commands into the console and view possible errors while the server was running. The console of a Minecraft server basically shows you a log of events with timestamps as well as a command input line at the bottom that enables you to execute in-game commands with administrator rights.
The console is started via a batch file:
:startup
@echo off
set v1=6
cls
Java -Xmx%v1%G -jar spigot.jar nogui
goto startup
The spigot.jar file is the file that basically runs the server.
Because we manage multiple servers and the TeamViewer process is quite insecure and slow, i wanted to find other ways to access the console.
Target: I want to create a HTML webinterface that uses JavaScript to communicate with the server console. It should be able to show the live console log as well as being able to type commands in the browser that are then executed in the commandline on the server.
Problems:
Is there any way to send a JavaScript input to the console so that I can execute commands from a webinterface?
Can I save the live console output to a .txt file that the JavaScript script can then display live on the webinterface?