Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@f2e7f442 simplify
This commit is contained in:
granny
2025-03-22 14:55:46 -07:00
parent 2d3cfe0a56
commit a76ef64526
6 changed files with 17 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -428,6 +_,20 @@
@@ -423,6 +_,20 @@
this.paperPluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(this, this.commandMap, pluginManager);
this.pluginManager.paperPluginManager = this.paperPluginManager;
// Paper end
@@ -21,7 +21,7 @@
CraftRegistry.setMinecraftRegistry(console.registryAccess());
@@ -1069,6 +_,7 @@
@@ -1064,6 +_,7 @@
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
@@ -29,7 +29,7 @@
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -1084,6 +_,7 @@
@@ -1079,6 +_,7 @@
}
}
world.spigotConfig.init(); // Spigot
@@ -37,7 +37,7 @@
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1101,6 +_,7 @@
@@ -1096,6 +_,7 @@
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
this.spark.registerCommandBeforePlugins(this); // Paper - spark
@@ -45,7 +45,7 @@
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -1600,6 +_,60 @@
@@ -1595,6 +_,60 @@
return true;
}
@@ -106,7 +106,7 @@
@Override
public List<Recipe> getRecipesFor(ItemStack result) {
Preconditions.checkArgument(result != null, "ItemStack cannot be null");
@@ -2955,6 +_,18 @@
@@ -2947,6 +_,18 @@
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}
@@ -125,7 +125,7 @@
@Override
public void restart() {
CraftServer.this.restart();
@@ -2988,6 +_,7 @@
@@ -2979,6 +_,7 @@
@Override
public double[] getTPS() {
return new double[] {
@@ -133,7 +133,7 @@
net.minecraft.server.MinecraftServer.getServer().tps1.getAverage(),
net.minecraft.server.MinecraftServer.getServer().tps5.getAverage(),
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
@@ -3195,4 +_,18 @@
@@ -3186,4 +_,18 @@
public void allowPausing(final Plugin plugin, final boolean value) {
this.console.addPluginAllowingSleep(plugin.getName(), value);
}

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -525,7 +_,7 @@
@@ -526,7 +_,7 @@
net.minecraft.server.level.ServerPlayer nmsKiller = killer == null ? null : ((CraftPlayer) killer).getHandle();
this.getHandle().setLastHurtByMob(nmsKiller);
if (nmsKiller != null) {

View File

@@ -1,6 +1,6 @@
--- a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
+++ b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
@@ -261,6 +_,7 @@
@@ -260,6 +_,7 @@
}
static {