Why couldn't you just use your own auto restarter?
|
is it possible to make it so that if u have the server running on 43594 already
then it trys to run it again, it cancles out the other 1 and runs off the new 1, as if it was a restart? :3
anyone got any clues? rep++
example:
server is running 10 players online
opens run.bat
server with 10 players, everyone is logged out, and logged in on the new batch window thats opened
understand?
thats not wat im asking about....
i have a restarter running, but sometimes lots of ppl online, so when it restarts, it lags and ends up saying that the server already in use... so yah....
hmm make a timer so that it runs one of the batch files and that after like...60 minutes or whatever it closes and then opens another batch file like runserver.bat insted of run.bat and just make it so that if runserver is already in use then diconnect and use the other one. Just switch through them. Good idea though, i like it.
You've tried? Support your theory
Place this into notepad and save as Restart.bat
Also rename you run batch file to Run.bat
Code:@echo off @title Restart echo Closing server... killtask java.exe echo. ping 127.0.0.1 -n 15 start Run.bat
Believe it or not, this is not the first time I've seen you comment on something you've not a clue about.
This is definitely possible...
-------------------------------------------------
I can't quite recall exactly how to do it, but I know that you can execute an external file using
As I said, I can't quite recall how you do it (A quick google search or two should help).Code:Runtime.getRuntime().exec("COMMAND LINE ARGUMENTS");
What you're going to have to do is something like this
Sorry I couldn't be of more help, I'm kind of busy working on other things at the moment, so I can't be arsed to do all of the research on my own. Sorry.Code:private static void restartServer() throws IOException { savePlayers(); //Save all connected players and disconnect them. serverSocket.close(); //Close the ServerSocket (So it's no longer occupying the port). Runtime.getRuntime().exec("COMMANDS"); //Start a new instance of the Server. System.exit(0); //Close this program. }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |