Set the minimum Java version to 16; drop Bedrock 1.17.0 (#2477)

This commit is contained in:
Camotoy 2021-09-10 14:10:56 -04:00 committed by GitHub
parent 93f5298ee3
commit bc0cfde8f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
93 changed files with 668 additions and 10637 deletions

View file

@ -6,7 +6,7 @@
<parent>
<groupId>org.geysermc</groupId>
<artifactId>bootstrap-parent</artifactId>
<version>1.4.2-SNAPSHOT</version>
<version>1.4.3-SNAPSHOT</version>
</parent>
<artifactId>bootstrap-standalone</artifactId>
@ -14,7 +14,7 @@
<dependency>
<groupId>org.geysermc</groupId>
<artifactId>connector</artifactId>
<version>1.4.2-SNAPSHOT</version>
<version>1.4.3-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
@ -89,7 +89,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.github.edwgiz</groupId>

View file

@ -98,32 +98,26 @@ public class GeyserStandaloneBootstrap implements GeyserBootstrap {
// Allows gui and nogui without options, for backwards compatibility
String arg = args[i];
switch (arg) {
case "--gui":
case "gui":
useGuiOpts = true;
break;
case "--nogui":
case "nogui":
useGuiOpts = false;
break;
case "--config":
case "-c":
case "--gui", "gui" -> useGuiOpts = true;
case "--nogui", "nogui" -> useGuiOpts = false;
case "--config", "-c" -> {
if (i >= args.length - 1) {
System.err.println(MessageFormat.format(LanguageUtils.getLocaleStringLog("geyser.bootstrap.args.config_not_specified"), "-c"));
return;
}
configFilenameOpt = args[i+1]; i++;
configFilenameOpt = args[i + 1];
i++;
System.out.println(MessageFormat.format(LanguageUtils.getLocaleStringLog("geyser.bootstrap.args.config_specified"), configFilenameOpt));
break;
case "--help":
case "-h":
}
case "--help", "-h" -> {
System.out.println(MessageFormat.format(LanguageUtils.getLocaleStringLog("geyser.bootstrap.args.usage"), "[java -jar] Geyser.jar [opts]"));
System.out.println(" " + LanguageUtils.getLocaleStringLog("geyser.bootstrap.args.options"));
System.out.println(" -c, --config [file] " + LanguageUtils.getLocaleStringLog("geyser.bootstrap.args.config"));
System.out.println(" -h, --help " + LanguageUtils.getLocaleStringLog("geyser.bootstrap.args.help"));
System.out.println(" --gui, --nogui " + LanguageUtils.getLocaleStringLog("geyser.bootstrap.args.gui"));
return;
default:
}
default -> {
// We have likely added a config option argument
if (arg.startsWith("--")) {
// Split the argument by an =
@ -159,9 +153,9 @@ public class GeyserStandaloneBootstrap implements GeyserBootstrap {
}
}
}
System.err.println(LanguageUtils.getLocaleStringLog("geyser.bootstrap.args.unrecognised", arg));
return;
}
}
}
bootstrap.onEnable(useGuiOpts, configFilenameOpt);

View file

@ -68,11 +68,10 @@ public final class GraphPanel extends JPanel {
@Override
protected void paintComponent(Graphics graphics) {
super.paintComponent(graphics);
if (!(graphics instanceof Graphics2D)) {
if (!(graphics instanceof final Graphics2D g)) {
graphics.drawString("Graphics is not Graphics2D, unable to render", 0, 0);
return;
}
final Graphics2D g = (Graphics2D) graphics;
g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
final int length = values.size();