mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Clean up a bunch
Mostly checked with IntelliJ, but manually performed. The only issue I possibly anticipate is item name/lore issues, but the new method should be technically better.
This commit is contained in:
parent
683ac1c763
commit
3a2cff7864
43 changed files with 125 additions and 190 deletions
|
@ -30,8 +30,7 @@ import org.geysermc.connector.dump.BootstrapDumpInfo;
|
|||
|
||||
@Getter
|
||||
public class GeyserStandaloneDumpInfo extends BootstrapDumpInfo {
|
||||
|
||||
private boolean isGui;
|
||||
private final boolean isGui;
|
||||
|
||||
GeyserStandaloneDumpInfo(GeyserStandaloneBootstrap bootstrap) {
|
||||
super();
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.geysermc.connector.utils.LanguageUtils;
|
|||
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.OpenOption;
|
||||
import java.nio.file.Paths;
|
||||
|
||||
public class LoopbackUtil {
|
||||
|
@ -54,7 +53,7 @@ public class LoopbackUtil {
|
|||
String result = sb.toString();
|
||||
|
||||
if (!result.contains("minecraftuwp")) {
|
||||
Files.write(Paths.get(System.getenv("temp") + "/loopback_minecraft.bat"), loopbackCommand.getBytes(), new OpenOption[0]);
|
||||
Files.write(Paths.get(System.getenv("temp") + "/loopback_minecraft.bat"), loopbackCommand.getBytes());
|
||||
Runtime.getRuntime().exec(startScript);
|
||||
|
||||
geyserLogger.info(ChatColor.AQUA + LanguageUtils.getLocaleStringLog("geyser.bootstrap.loopback.added"));
|
||||
|
|
|
@ -60,8 +60,8 @@ public class ColorPane extends JTextPane {
|
|||
*/
|
||||
public void appendANSI(String s) { // convert ANSI color codes first
|
||||
int aPos = 0; // current char position in addString
|
||||
int aIndex = 0; // index of next Escape sequence
|
||||
int mIndex = 0; // index of "m" terminating Escape sequence
|
||||
int aIndex; // index of next Escape sequence
|
||||
int mIndex; // index of "m" terminating Escape sequence
|
||||
String tmpString = "";
|
||||
boolean stillSearching = true; // true until no more Escape sequences
|
||||
String addString = remaining + s;
|
||||
|
@ -83,7 +83,6 @@ public class ColorPane extends JTextPane {
|
|||
|
||||
|
||||
// while there's text in the input buffer
|
||||
stillSearching = true;
|
||||
while (stillSearching) {
|
||||
mIndex = addString.indexOf("m", aPos); // find the end of the escape sequence
|
||||
if (mIndex < 0) { // the buffer ends halfway through the ansi string!
|
||||
|
|
|
@ -46,7 +46,7 @@ public final class GraphPanel extends JPanel {
|
|||
private final static Color pointColor = new Color(100, 100, 100, 255);
|
||||
private final static Color gridColor = new Color(200, 200, 200, 255);
|
||||
private static final Stroke graphStroke = new BasicStroke(2f);
|
||||
private List<Integer> values = new ArrayList<>(10);
|
||||
private final List<Integer> values = new ArrayList<>(10);
|
||||
|
||||
@Setter
|
||||
private String xLabel = "";
|
||||
|
@ -172,6 +172,7 @@ public final class GraphPanel extends JPanel {
|
|||
for (Point graphPoint : graphPoints) {
|
||||
final int x = graphPoint.x - pointWidth / 2;
|
||||
final int y = graphPoint.y - pointWidth / 2;
|
||||
//noinspection SuspiciousNameCombination
|
||||
g.fillOval(x, y, pointWidth, pointWidth);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue