Archiviert
13
0

Fix paper + paper java 16 support

Dieser Commit ist enthalten in:
Lixfel 2021-10-12 11:38:37 +02:00
Ursprung d4f81e6fa0
Commit 79e6995c7a
3 geänderte Dateien mit 59 neuen und 24 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,40 @@
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;
}

Datei anzeigen

@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: yoyonow <jwsteam@nidido.de>
Date: Wed, 16 Jun 2021 20:56:09 +0200
Subject: [PATCH] Undo partial 'Paper/Spigot-Server-Patches/0004-MC-Utils.patch'
---
SystemUtils.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/SystemUtils.java b/src/main/java/net/minecraft/SystemUtils.java
index b0746aa..b4cb8a9 100644
--- a/src/main/java/net/minecraft/SystemUtils.java
+++ b/src/main/java/net/minecraft/SystemUtils.java
@@ -64,7 +64,7 @@ public class SystemUtils {
}
public static long getMonotonicNanos() {
- return System.nanoTime();
+ return a.getAsLong();
}
public static long getTimeMillis() {
--

Datei anzeigen

@ -0,0 +1,19 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lixfel <agga-games@gmx.de>
Date: Tue, 12 Oct 2021 11:36:45 +0200
Subject: [PATCH] Revert paper timing changes
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
index aa399e7f6518ff70f2214161319170b1fc911751..0836606e21bb491808445b41eaaa1cacac07ef93 100644
--- a/src/main/java/net/minecraft/server/SystemUtils.java
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
@@ -58,7 +58,7 @@ public class SystemUtils {
}
public static long getMonotonicNanos() {
- return System.nanoTime(); // Paper
+ return a.getAsLong();
}
public static long getTimeMillis() {