Archiviert
13
0
Dieses Repository wurde am 2021-12-14 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
SteamSpigot/Paper/SteamWar-Patches/0567-Java-16-compatibility.patch

41 Zeilen
1.8 KiB
Diff

2021-10-12 11:38:37 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lixfel <agga-games@gmx.de>
Date: Tue, 12 Oct 2021 11:32:24 +0200
Subject: [PATCH] Java 16 compatibility
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 2ea6f5b7da35cbb342e72a00ea70fef667f05d49..44ca5cd06c64c58aa511c589a401762c02201934 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -204,12 +204,6 @@ public class Main {
return;
}
- float javaVersion = Float.parseFloat(System.getProperty("java.class.version"));
- if (javaVersion > 58.0) {
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 14 is supported.");
- if (!Boolean.getBoolean("Paper.IgnoreJavaVersion")) return; // Paper
- }
-
try {
// Paper start - Handled by TerminalConsoleAppender
/*
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 004b6ce132f8a686116b2a03a0a57461c8e164cf..807e8fcc7a0b2a6607d1d307fa8e71f5e3279772 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -295,12 +295,6 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz) {
- try {
- clazz = Commodore.convert(clazz, !isLegacy(pdf));
- } catch (Exception ex) {
- Bukkit.getLogger().log(Level.SEVERE, "Fatal error trying to convert " + pdf.getFullName() + ":" + path, ex);
- }
-
return clazz;
}