So basically my problem is this: I have a hunger games server that uses libshungergames. After each game the server shuts its self down. However i want it to start up again, my idea was to run a script however my server hosts will not allow me to run a script. So i had an idea that you put in a command from say a website or through bungeecord and it starts the server up. Thanks
I don't think this is possible as without the server being started, plugins are not loaded meaning commands cannot be run. There may be a way to do this but from my knowledge, it is not able to be done.
You could change your startup script to the following for each of the servers: Code: ECHO OFF SET BINDIR=%~dp0 CD /D "%BINDIR%" :start java -Xms2G -Xmx2G -jar craftbukkit.jar goto start
If you cannot run custom scripts on your host then your out of luck. There's no way to do this without some form of third party scripts or application. Find a better provider
DanSpedey How do you start your server up manually after a round of hunger games? Do you use a control panel or something? And if so what one?
rf2minecraft Just an idea but would a plugin that has this on in his ondisable event restart the server? Code:java Runtime.getRuntime().exec("java -jar craftbukkit.jar") phillmac Reloading your server would than be a bad idea if i would made something like this for you. But i guess this would work.
I don't use hunger games on my server. I'm just trying to get some info on what the op normally does to get his server back online so I have some idea of what there is to work with... E.g. does his control panel have a API that can be hooked into to send an automatic start command?
phillmac If you have access to the run.bat then you can just modify that so that it will restart the server. Some control panels are able to restart the server on a shutdown And using an API is nearly impossible since you need to send commands to start the server when it is still running
timtower The problem that the op here has put forward is that he does not have access to run.bat or any other script file. A decent control panel API will let you do just about anything you can do from its standard interface, like start and stop the server, and issue in game commands when the server is running so that you can do what ever initialization you need to get the server ready.
But you can create a plugin that will download and execute another java program that will listen on server port while server is offline.
You already gave the answer to the issue, logging in into the control panel and start the server again. And won't that program be stopped when the server will be stopped? DanSpedey What control panel do you have anyways?
Nope. Just download something and try to run it with ProcessBuilder, it won't stop after the program which started it stops.