Kingdomkey01
June 9th, 2011, 19:30
First go to packet 103 (commands), and add this
if (cmd.equalsIgnoreCase("restartserver") && plr.playerRights > 2) {
for (Player p : PlayerHandler.players) {
if (p == null)
continue;
}
System.exit(0);
}
^ This is compatible with my source, if you're having errors, change the red marks accordingly.
Next in your run.bat file, add the red markings:
@echo off
title [SELDOM]: Running server...
:run
CLS
java -Xmx800m -cp bin;deps/poi.jar;libs/mysql.jar;libs/mina.jar;libs/slf4j.jar;deps/slf4j-nop.jar;libs/jython.jar;log4j-1.2.15.jar;libs/mysql-connector-java-5.1.6-bin.jar; seldom.Server
goto run
pause
Don't forget to import your PlayerHandler class if you need too.
if (cmd.equalsIgnoreCase("restartserver") && plr.playerRights > 2) {
for (Player p : PlayerHandler.players) {
if (p == null)
continue;
}
System.exit(0);
}
^ This is compatible with my source, if you're having errors, change the red marks accordingly.
Next in your run.bat file, add the red markings:
@echo off
title [SELDOM]: Running server...
:run
CLS
java -Xmx800m -cp bin;deps/poi.jar;libs/mysql.jar;libs/mina.jar;libs/slf4j.jar;deps/slf4j-nop.jar;libs/jython.jar;log4j-1.2.15.jar;libs/mysql-connector-java-5.1.6-bin.jar; seldom.Server
goto run
pause
Don't forget to import your PlayerHandler class if you need too.