Skip to content

Commit

Permalink
Remove GUI code
Browse files Browse the repository at this point in the history
  • Loading branch information
replydev committed Dec 6, 2022
1 parent da320c6 commit de61e82
Show file tree
Hide file tree
Showing 16 changed files with 8 additions and 931 deletions.
5 changes: 1 addition & 4 deletions src/main/java/me/replydev/mcping/net/Check.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import me.replydev.mcping.data.FinalResponse;
import me.replydev.qubo.Info;
import me.replydev.qubo.QuboInstance;
import me.replydev.qubo.gui.MainWindow;
import me.replydev.utils.FileUtils;

import java.io.IOException;
Expand Down Expand Up @@ -89,9 +88,7 @@ private void check() {
String singleLine = "(" + hostname + ":" + port + ")(" + response.getPlayers().getOnline() + "/" + response.getPlayers().getMax() + ")" + "(" + response.getVersion().getName() + ")" + "(" + des + ")";
Info.serverFound++;
Info.serverNotFilteredFound++;
if (Info.gui) {
MainWindow.dtm.addRow(new Object[]{Info.serverFound, hostname, port, response.getPlayers().getOnline() + "/" + response.getPlayers().getMax(), response.getVersion().getName(), des});
} else System.out.println(singleLine);
System.out.println(singleLine);

if (quboInstance.inputData.isOutput() && Files.exists(Paths.get(filename))) {
if (quboInstance.inputData.isFulloutput()) {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/me/replydev/qubo/Info.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package me.replydev.qubo;

public class Info {
public static final String version = "0.4";
public static final String version = "1.0.0-SNAPSHOT";
public static final String otherVersionInfo = "";
public static int serverFound = 0;
public static int serverNotFilteredFound = 0;
public static boolean gui;
public static boolean debugMode;
}
4 changes: 1 addition & 3 deletions src/main/java/me/replydev/qubo/InputData.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ public InputData(String[] command) throws InvalidRangeException, NumberFormatExc
ipEnd = range.getUpper().toString();
}
} catch (NullPointerException | IndexOutOfBoundsException e) {
if (Info.gui) throw new InvalidRangeException();
else help();
help();
}

try {
Expand All @@ -65,7 +64,6 @@ public InputData(String[] command) throws InvalidRangeException, NumberFormatExc
try {
portrange = new PortList(cmd.getOptionValue("ports"));
} catch (NumberFormatException e) {
if (Info.gui) throw new NumberFormatException();
help();
}

Expand Down
15 changes: 1 addition & 14 deletions src/main/java/me/replydev/qubo/Main.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
package me.replydev.qubo;

import com.formdev.flatlaf.FlatDarculaLaf;
import me.replydev.qubo.gui.MainWindow;

import javax.swing.*;

public class Main {
public static void main(String[] args) {
if (args.length == 0) {
FlatDarculaLaf.install();
JFrame.setDefaultLookAndFeelDecorated(true);
Info.gui = true;
new MainWindow();
} else {
Info.gui = false;
CLI.init(args);
}
CLI.init(args);
}
}
9 changes: 0 additions & 9 deletions src/main/java/me/replydev/qubo/gui/Confirm.java

This file was deleted.

32 changes: 0 additions & 32 deletions src/main/java/me/replydev/qubo/gui/InstanceRunnable.java

This file was deleted.

Loading

0 comments on commit de61e82

Please # to comment.