Minor fixes
This commit is contained in:
parent
3b3600fb68
commit
bcaf8640d4
@ -4,7 +4,6 @@ import net.knarcraft.serverlauncher.userinterface.GUI;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URL;
|
||||
import java.nio.Buffer;
|
||||
import java.util.Scanner;
|
||||
import java.nio.file.*;
|
||||
import java.util.ArrayList;
|
||||
@ -97,7 +96,7 @@ public class Server {
|
||||
public static void stop() throws IOException {
|
||||
for (Server server : servers) {
|
||||
if (server.writer != null) {
|
||||
if (server.type.getName() == "Bungee") {
|
||||
if (server.type.getName().equals("Bungee")) {
|
||||
server.writer.write("end\n");
|
||||
} else {
|
||||
server.writer.write("stop\n");
|
||||
@ -134,7 +133,9 @@ public class Server {
|
||||
public static void startServers() {
|
||||
System.out.println("Starting servers.");
|
||||
for (Server server : servers) {
|
||||
server.run();
|
||||
if (!server.run()) {
|
||||
gui.setStatus("An error occurred. Start aborted");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,7 +149,7 @@ public class Server {
|
||||
this.downloadJar();
|
||||
gui.setStatus("File downloaded");
|
||||
} catch (FileNotFoundException e) {
|
||||
System.out.println("File was not found");
|
||||
gui.setStatus("Error: Jar file not found");
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
|
@ -14,7 +14,7 @@ import java.io.*;
|
||||
* @since 0.0.0.1
|
||||
*/
|
||||
class ServerTest {
|
||||
public static void main(String[] args) throws IOException {
|
||||
public static void main(String[] args) {
|
||||
EventQueue.invokeLater(() -> {
|
||||
try {
|
||||
setup();
|
||||
|
Loading…
Reference in New Issue
Block a user