geforkt von SteamWar/PersistentBungeeCore
Merge pull request 'Enable command execution, force destruction' (#20) from executeCommand into master
Reviewed-on: SteamWar/PersistentBungeeCore#20 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
3b96517682
@ -130,11 +130,15 @@ public class Subserver implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
public void execute(String command) {
|
||||
writer.println(command);
|
||||
}
|
||||
|
||||
public void stop(){
|
||||
writer.println("stop");
|
||||
execute("stop");
|
||||
try {
|
||||
if(!process.waitFor(1, TimeUnit.MINUTES))
|
||||
process.destroy();
|
||||
process.destroyForcibly();
|
||||
thread.join();
|
||||
}catch(InterruptedException e){
|
||||
logger.log(Level.SEVERE, "Subserver stop interrupted!", e);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren