Archiviert
13
0

Fix patch
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2023-02-23 17:37:37 +01:00
Ursprung 8569456349
Commit 6eb7a87369
2 geänderte Dateien mit 19 neuen und 18 gelöschten Zeilen

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Initialisation improvements
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index f7cfe6c0d9d52ed72d0d45baaaf856c15769c668..5ca6976c86d680ec6e2fc8bc3bcb54af56ac8138 100644 index 7d300a539ac2ef1c773cfa90cecc8655490a8686..f5fdc6b0f8917db82fcac7dd6efe8314c87eb25e 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -180,47 +180,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot @@ -189,47 +189,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
Class<?> result = classes.get(name); Class<?> result = classes.get(name);
if (result == null) { if (result == null) {
@ -24,7 +24,7 @@ index f7cfe6c0d9d52ed72d0d45baaaf856c15769c668..5ca6976c86d680ec6e2fc8bc3bcb54af
- throw new ClassNotFoundException(name, ex); - throw new ClassNotFoundException(name, ex);
- } - }
- -
- classBytes = loader.server.getUnsafe().processClass(description, path, classBytes); - classBytes = org.bukkit.Bukkit.getServer().getUnsafe().processClass(description, path, classBytes); // Paper
- -
- int dot = name.lastIndexOf('.'); - int dot = name.lastIndexOf('.');
- if (dot != -1) { - if (dot != -1) {
@ -55,5 +55,5 @@ index f7cfe6c0d9d52ed72d0d45baaaf856c15769c668..5ca6976c86d680ec6e2fc8bc3bcb54af
- } - }
+ result = super.findClass(name); + result = super.findClass(name);
loader.setClass(name, result);
classes.put(name, result); classes.put(name, result);
this.setClass(name, result); // Paper

Datei anzeigen

@ -58,10 +58,10 @@ index b8b17d046f836c8652ab094db00ab1af84971b2c..e5790e871c46f9d2b92237ed378ecea5
this.mappingsByObfName = maps.stream().collect(Collectors.toUnmodifiableMap(ClassMapping::obfName, map -> map)); this.mappingsByObfName = maps.stream().collect(Collectors.toUnmodifiableMap(ClassMapping::obfName, map -> map));
this.mappingsByMojangName = maps.stream().collect(Collectors.toUnmodifiableMap(ClassMapping::mojangName, map -> map)); this.mappingsByMojangName = maps.stream().collect(Collectors.toUnmodifiableMap(ClassMapping::mojangName, map -> map));
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index 330f6c79417378da855326b4da665f9d240e748d..24a232c2483b5678ecc40a75a638259c3e935e93 100644 index e92864ecf32dd984f6f87f7b05341e43af3a2977..e60a8eb7d0ff59cf3808020c84bae92a6824347c 100644
--- a/src/main/java/net/minecraft/commands/Commands.java --- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -136,60 +136,60 @@ public class Commands { @@ -137,60 +137,60 @@ public class Commands {
public Commands(Commands.CommandSelection environment, CommandBuildContext commandRegistryAccess) { public Commands(Commands.CommandSelection environment, CommandBuildContext commandRegistryAccess) {
this(); // CraftBukkit this(); // CraftBukkit
@ -161,7 +161,7 @@ index 330f6c79417378da855326b4da665f9d240e748d..24a232c2483b5678ecc40a75a638259c
WeatherCommand.register(this.dispatcher); WeatherCommand.register(this.dispatcher);
WorldBorderCommand.register(this.dispatcher); WorldBorderCommand.register(this.dispatcher);
if (JvmProfiler.INSTANCE.isAvailable()) { if (JvmProfiler.INSTANCE.isAvailable()) {
@@ -201,18 +201,18 @@ public class Commands { @@ -202,18 +202,18 @@ public class Commands {
} }
if (environment.includeDedicated) { if (environment.includeDedicated) {
@ -190,7 +190,7 @@ index 330f6c79417378da855326b4da665f9d240e748d..24a232c2483b5678ecc40a75a638259c
WhitelistCommand.register(this.dispatcher); WhitelistCommand.register(this.dispatcher);
} }
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 31faf2d6492696f7d0c99a48edbc0d6f15db1209..9281ba58a4b4d3387ff0fb2ba717582e5ffa2bf8 100644 index a821cb33fbc29109aec68f9d6a0eb2efc121ee13..561bd260592de9096493068e1bf47d03d12ba9a4 100644
--- a/src/main/java/net/minecraft/server/Main.java --- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java
@@ -12,8 +12,11 @@ import java.io.File; @@ -12,8 +12,11 @@ import java.io.File;
@ -232,7 +232,7 @@ index 31faf2d6492696f7d0c99a48edbc0d6f15db1209..9281ba58a4b4d3387ff0fb2ba717582e
/* CraftBukkit start - Replace everything /* CraftBukkit start - Replace everything
OptionParser optionparser = new OptionParser(); OptionParser optionparser = new OptionParser();
OptionSpec<Void> optionspec = optionparser.accepts("nogui"); OptionSpec<Void> optionspec = optionparser.accepts("nogui");
@@ -105,15 +115,13 @@ public class Main { @@ -105,8 +115,6 @@ public class Main {
*/ // CraftBukkit end */ // CraftBukkit end
try { try {
@ -241,7 +241,8 @@ index 31faf2d6492696f7d0c99a48edbc0d6f15db1209..9281ba58a4b4d3387ff0fb2ba717582e
if (optionset.has("jfrProfile")) { // CraftBukkit if (optionset.has("jfrProfile")) { // CraftBukkit
JvmProfiler.INSTANCE.start(Environment.SERVER); JvmProfiler.INSTANCE.start(Environment.SERVER);
} }
@@ -124,7 +132,7 @@ public class Main {
// Paper end
Bootstrap.bootStrap(); Bootstrap.bootStrap();
Bootstrap.validate(); Bootstrap.validate();
- Util.startTimerHackThread(); - Util.startTimerHackThread();
@ -249,7 +250,7 @@ index 31faf2d6492696f7d0c99a48edbc0d6f15db1209..9281ba58a4b4d3387ff0fb2ba717582e
Path path = Paths.get("server.properties"); Path path = Paths.get("server.properties");
DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(optionset); // CraftBukkit - CLI argument support DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(optionset); // CraftBukkit - CLI argument support
@@ -182,6 +190,10 @@ public class Main { @@ -193,6 +201,10 @@ public class Main {
} }
// Paper end - fix SPIGOT-5824 // Paper end - fix SPIGOT-5824
Services services = Services.create(new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY), file, userCacheFile, optionset); // Paper Services services = Services.create(new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY), file, userCacheFile, optionset); // Paper
@ -260,7 +261,7 @@ index 31faf2d6492696f7d0c99a48edbc0d6f15db1209..9281ba58a4b4d3387ff0fb2ba717582e
// CraftBukkit start // CraftBukkit start
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName); String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath()); LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
@@ -208,7 +220,7 @@ public class Main { @@ -219,7 +231,7 @@ public class Main {
PackRepository resourcepackrepository = ServerPacksSource.createPackRepository(convertable_conversionsession.getLevelPath(LevelResource.DATAPACK_DIR)); PackRepository resourcepackrepository = ServerPacksSource.createPackRepository(convertable_conversionsession.getLevelPath(LevelResource.DATAPACK_DIR));
// CraftBukkit start // CraftBukkit start
@ -269,7 +270,7 @@ index 31faf2d6492696f7d0c99a48edbc0d6f15db1209..9281ba58a4b4d3387ff0fb2ba717582e
if (!bukkitDataPackFolder.exists()) { if (!bukkitDataPackFolder.exists()) {
bukkitDataPackFolder.mkdirs(); bukkitDataPackFolder.mkdirs();
} }
@@ -222,7 +234,7 @@ public class Main { @@ -233,7 +245,7 @@ public class Main {
+ "}\n", mcMeta, com.google.common.base.Charsets.UTF_8); + "}\n", mcMeta, com.google.common.base.Charsets.UTF_8);
} catch (java.io.IOException ex) { } catch (java.io.IOException ex) {
throw new RuntimeException("Could not initialize Bukkit datapack", ex); throw new RuntimeException("Could not initialize Bukkit datapack", ex);
@ -306,7 +307,7 @@ index 710ca7d3a5659953f64bc6dccdd93b43300961cc..2f638447e1f21e93fc9dd07e3870e22b
} }
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 51b3db0b6c2cede95b584268e035c0fb36d38094..777e205f57c94e569e0d52293abe729743cc09c9 100644 index a7e133f3495e9132a5fdae2c24f225e7b026295a..4efe15c981094134c11122d7566917f337be482d 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -17,6 +17,7 @@ import java.util.Collections; @@ -17,6 +17,7 @@ import java.util.Collections;
@ -809,10 +810,10 @@ index 5049e969e06f4cc1826378249548064042c28410..4427ba72ab3963af71150e70aa6101ee
} }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index bfc4ee36befb925ab4eb6b96f5c1aa6c76bf711f..31d33f590537703da7b5bee4c367cc51fe035732 100644 index 621919a4a45caa73a43020fdca24764d95d89fd2..cb6e61f39e8847c6b15fe570fafac59241265e71 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -411,7 +411,7 @@ public final class CraftServer implements Server { @@ -413,7 +413,7 @@ public final class CraftServer implements Server {
try { try {
this.configuration.save(this.getConfigFile()); this.configuration.save(this.getConfigFile());
} catch (IOException ex) { } catch (IOException ex) {
@ -821,7 +822,7 @@ index bfc4ee36befb925ab4eb6b96f5c1aa6c76bf711f..31d33f590537703da7b5bee4c367cc51
} }
} }
@@ -419,7 +419,7 @@ public final class CraftServer implements Server { @@ -421,7 +421,7 @@ public final class CraftServer implements Server {
try { try {
this.commandsConfiguration.save(this.getCommandsConfigFile()); this.commandsConfiguration.save(this.getCommandsConfigFile());
} catch (IOException ex) { } catch (IOException ex) {
@ -830,7 +831,7 @@ index bfc4ee36befb925ab4eb6b96f5c1aa6c76bf711f..31d33f590537703da7b5bee4c367cc51
} }
} }
@@ -503,7 +503,7 @@ public final class CraftServer implements Server { @@ -483,7 +483,7 @@ public final class CraftServer implements Server {
DefaultPermissions.registerCorePermissions(); DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions();
if (!io.papermc.paper.configuration.GlobalConfiguration.get().misc.loadPermissionsYmlBeforePlugins) this.loadCustomPermissions(); // Paper if (!io.papermc.paper.configuration.GlobalConfiguration.get().misc.loadPermissionsYmlBeforePlugins) this.loadCustomPermissions(); // Paper