Skip to content

Commit

Permalink
1.16.5 removal part 3: update Java target to Java 16
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 1, 2023
1 parent 25c4dcd commit 9a5ced6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions dist/pom.xml
Expand Up @@ -75,7 +75,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.4.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -168,8 +168,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>16</source>
<target>16</target>
</configuration>
</plugin>
</plugins>
Expand Down
6 changes: 3 additions & 3 deletions plugin/pom.xml
Expand Up @@ -99,7 +99,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<version>3.4.1</version>
<executions>
<execution>
<phase>package</phase>
Expand Down Expand Up @@ -143,8 +143,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>16</source>
<target>16</target>
</configuration>
</plugin>
</plugins>
Expand Down
12 changes: 6 additions & 6 deletions plugin/src/main/java/com/denizenscript/denizen/Denizen.java
Expand Up @@ -134,20 +134,20 @@ public void onEnable() {
DebugInternals.alternateTrimLogic = FormattedTextHelper::bukkitSafeDebugTrimming;
String javaVersion = System.getProperty("java.version");
Debug.log("Running on java version: " + javaVersion);
if (javaVersion.startsWith("8") || javaVersion.startsWith("1.8")) {
Debug.log("Running on fully supported Java 8. Updating to Java 17+ is recommended.");
}
else if (javaVersion.startsWith("9") || javaVersion.startsWith("1.9") || javaVersion.startsWith("10") || javaVersion.startsWith("1.10")
|| javaVersion.startsWith("11")
if (javaVersion.startsWith("8") || javaVersion.startsWith("1.8") || javaVersion.startsWith("9") || javaVersion.startsWith("1.9")
|| javaVersion.startsWith("10") || javaVersion.startsWith("1.10") || javaVersion.startsWith("11")
|| javaVersion.startsWith("12") || javaVersion.startsWith("13") || javaVersion.startsWith("14") || javaVersion.startsWith("15")) {
getLogger().warning("Running unreliable Java version. Old Minecraft is built for Java 8, modern Minecraft is built for Java 17. Other Java versions are not guaranteed to function properly.");
Debug.log("Running on outdated Java version somehow. Denizen requires Java 16+ or newer to function.");
}
else if (javaVersion.startsWith("16")) {
Debug.log("Running on fully supported Java 16.");
}
else if (javaVersion.startsWith("17")) {
Debug.log("Running on fully supported Java 17.");
}
else if (javaVersion.startsWith("18") || javaVersion.startsWith("19")) {
getLogger().warning("Running unreliable future Java version. modern Minecraft versions are built for Java 17. Other Java versions are not guaranteed to function properly.");
}
else {
Debug.log("Running on unrecognized (future?) Java version. May or may not work.");
}
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -74,8 +74,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>16</source>
<target>16</target>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 9a5ced6

Please sign in to comment.