Never seen it done but i'm sure it maybe possible.
|
I'd like to know if its possible to run a .bat from a command.
So from a ::restart, or maybe ::compile.
Thanks!
Never seen it done but i'm sure it maybe possible.
For restarting, it's possible, here's the command:
As for compiling, it should be possibly with executing a method that would run a batch file on the source. Not 100% sure.Code:if (playerCommand.equalsIgnoreCase("restart")) { for (Player p : PlayerHandler.players) { if (p == null) continue; if (p.inTrade) { ((Client) p).getTradeAndDuel().declineTrade(); System.out.println(p.playerName + " was trading and has just been saved :)"); } PlayerSave.saveGame((Client) p); System.out.println("Saved game for " + p.playerName + "."); } System.exit(0); }
if (playerCommand.equalsIgnoreCase("restart")) {
for (Player p : PlayerHandler.players) {
if (p == null)
continue;
if (p.inTrade) {
((Client) p).getTradeAndDuel().declineTrade();
System.out.println(p.playerName
+ " was trading and has just been saved ");
}
PlayerSave.saveGame((Client) p);
System.out.println("Saved game for " + p.playerName + ".");
}
System.exit(0);
}
I'm sorry, but i'm asking it to reopen the .bat when it shutdown.
Still looking for help
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |