9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2026-01-04 15:41:31 +00:00

Update Paper

This commit is contained in:
violetc
2023-06-17 15:40:18 +08:00
parent 376780651a
commit 2710cdf7aa
7 changed files with 345 additions and 297 deletions

View File

@@ -65,10 +65,10 @@ index 147d802d9207e358fdb2d1c7806fc2f634dcfd98..4f0a2c9b352f5824ec0c30d0f0af0fe1
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 46bececa35aac65ba95aed49702a6bf8aa6789ec..a0b0c99587dc0e0ce804c0c7c2b4d0bcf2fb0c2e 100644
index c6be267357a26393e58d7f3a76a425922b8cfa0d..8bbd7539cbd70201bf75ad80cf199b99e5cbd47a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -979,6 +979,7 @@ public final class CraftServer implements Server {
@@ -983,6 +983,7 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
@@ -76,7 +76,7 @@ index 46bececa35aac65ba95aed49702a6bf8aa6789ec..a0b0c99587dc0e0ce804c0c7c2b4d0bc
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -994,6 +995,7 @@ public final class CraftServer implements Server {
@@ -998,6 +999,7 @@ public final class CraftServer implements Server {
}
}
world.spigotConfig.init(); // Spigot
@@ -84,7 +84,7 @@ index 46bececa35aac65ba95aed49702a6bf8aa6789ec..a0b0c99587dc0e0ce804c0c7c2b4d0bc
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1009,6 +1011,7 @@ public final class CraftServer implements Server {
@@ -1013,6 +1015,7 @@ public final class CraftServer implements Server {
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
@@ -92,7 +92,7 @@ index 46bececa35aac65ba95aed49702a6bf8aa6789ec..a0b0c99587dc0e0ce804c0c7c2b4d0bc
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -2775,6 +2778,14 @@ public final class CraftServer implements Server {
@@ -2779,6 +2782,14 @@ public final class CraftServer implements Server {
{
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}