fix compile issue

This commit is contained in:
Jake Potrebic 2022-06-09 14:50:05 -07:00
parent 3f1c6a45da
commit e5ed99a29a
No known key found for this signature in database
GPG Key ID: ECE0B3C133C016C5
5 changed files with 24 additions and 24 deletions

View File

@ -4052,7 +4052,7 @@ index c1194f459414dc6ca9626ab8cec48cb48cdd926b..649df119b24dc8c390f45e9f813cf8c3
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 1d94c0fbdead83155aefc8d4a16dbcb95b3c9838..cb03d577ee25ceba3263febe186f6f668d1c7e7a 100644
index 1d94c0fbdead83155aefc8d4a16dbcb95b3c9838..42be8ab024e5c889b2a114f1098e1bedd1193d80 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -861,6 +861,7 @@ public final class CraftServer implements Server {
@ -4063,14 +4063,6 @@ index 1d94c0fbdead83155aefc8d4a16dbcb95b3c9838..cb03d577ee25ceba3263febe186f6f66
for (ServerLevel world : this.console.getAllLevels()) {
world.serverLevelData.setDifficulty(config.difficulty);
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
@@ -882,6 +883,7 @@ public final class CraftServer implements Server {
this.commandMap.clearCommands();
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
+ io.papermc.paper.configuration.PaperConfigurations.registerCommands(this.console);
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index e5008c75054df38356af193fd049110d7d56e2d4..c694c6dfed0b3aa098b1822676e39bd3eb04b45a 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java

View File

@ -17,7 +17,7 @@ Subject: [PATCH] CB fixes
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 2cf12d6429eb46398069d9bfa60ebcc3a840f60f..a0140ea91f51e52174cff43738a9a159c3d24536 100644
index d9287cdcbd488a87832724feb7614b142a426aa3..d9cdd61006f1aef2e3d0bdd727bd436fea1b8327 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -289,7 +289,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -67,10 +67,10 @@ index 9998e1c94b72b90dd3ba4bcce1b4b3653b9b1b2b..963ad3ce1ef83888ae1537ff01accdbb
this.registryAccess = registryManager;
this.structureTemplateManager = structureTemplateManager;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index cb03d577ee25ceba3263febe186f6f668d1c7e7a..036aa7daa097c2ba0f08a1fcc66c2962883ca72f 100644
index 42be8ab024e5c889b2a114f1098e1bedd1193d80..d239bc3f3cd1490acbac9d50239cc0a3d824148e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2248,7 +2248,13 @@ public final class CraftServer implements Server {
@@ -2247,7 +2247,13 @@ public final class CraftServer implements Server {
Validate.notNull(key, "NamespacedKey cannot be null");
LootTables registry = this.getServer().getLootTables();

View File

@ -1814,7 +1814,7 @@ index 595b56b2ab9a813ba71399d306117294fa90dc65..3527d40102d512d0e276edc969ea3c18
}
collection = icons;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 036aa7daa097c2ba0f08a1fcc66c2962883ca72f..f9ddb9835cad1b76eecd639dff8fa29472954421 100644
index d239bc3f3cd1490acbac9d50239cc0a3d824148e..33e1a2c12a82f04d2a1da02b915402bbee76e1dd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -581,8 +581,10 @@ public final class CraftServer implements Server {
@ -1828,7 +1828,7 @@ index 036aa7daa097c2ba0f08a1fcc66c2962883ca72f..f9ddb9835cad1b76eecd639dff8fa294
}
@Override
@@ -1403,7 +1405,15 @@ public final class CraftServer implements Server {
@@ -1402,7 +1404,15 @@ public final class CraftServer implements Server {
return this.configuration.getInt("settings.spawn-radius", -1);
}
@ -1844,7 +1844,7 @@ index 036aa7daa097c2ba0f08a1fcc66c2962883ca72f..f9ddb9835cad1b76eecd639dff8fa294
public String getShutdownMessage() {
return this.configuration.getString("settings.shutdown-message");
}
@@ -1561,7 +1571,20 @@ public final class CraftServer implements Server {
@@ -1560,7 +1570,20 @@ public final class CraftServer implements Server {
}
@Override
@ -1865,7 +1865,7 @@ index 036aa7daa097c2ba0f08a1fcc66c2962883ca72f..f9ddb9835cad1b76eecd639dff8fa294
Set<CommandSender> recipients = new HashSet<>();
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
@@ -1569,14 +1592,14 @@ public final class CraftServer implements Server {
@@ -1568,14 +1591,14 @@ public final class CraftServer implements Server {
}
}
@ -1882,7 +1882,7 @@ index 036aa7daa097c2ba0f08a1fcc66c2962883ca72f..f9ddb9835cad1b76eecd639dff8fa294
for (CommandSender recipient : recipients) {
recipient.sendMessage(message);
@@ -1827,6 +1850,14 @@ public final class CraftServer implements Server {
@@ -1826,6 +1849,14 @@ public final class CraftServer implements Server {
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
}
@ -1897,7 +1897,7 @@ index 036aa7daa097c2ba0f08a1fcc66c2962883ca72f..f9ddb9835cad1b76eecd639dff8fa294
@Override
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
Validate.isTrue(type.isCreatable(), "Cannot open an inventory of type ", type);
@@ -1839,13 +1870,28 @@ public final class CraftServer implements Server {
@@ -1838,13 +1869,28 @@ public final class CraftServer implements Server {
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
}
@ -1926,7 +1926,7 @@ index 036aa7daa097c2ba0f08a1fcc66c2962883ca72f..f9ddb9835cad1b76eecd639dff8fa294
public Merchant createMerchant(String title) {
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
}
@@ -1905,6 +1951,12 @@ public final class CraftServer implements Server {
@@ -1904,6 +1950,12 @@ public final class CraftServer implements Server {
return Thread.currentThread().equals(console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
}
@ -1939,7 +1939,7 @@ index 036aa7daa097c2ba0f08a1fcc66c2962883ca72f..f9ddb9835cad1b76eecd639dff8fa294
@Override
public String getMotd() {
return this.console.getMotd();
@@ -2322,4 +2374,15 @@ public final class CraftServer implements Server {
@@ -2321,4 +2373,15 @@ public final class CraftServer implements Server {
return this.spigot;
}
// Spigot end

View File

@ -341,10 +341,18 @@ index e476f93547f386ded0174693a6218d793ccc450b..393e465b0bac55d407f2ec66d7b11ed0
this.setPvpAllowed(dedicatedserverproperties.pvp);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f9ddb9835cad1b76eecd639dff8fa29472954421..268715e19a6fa7d26510d9d0a8f19b158835b279 100644
index 33e1a2c12a82f04d2a1da02b915402bbee76e1dd..c8c205db57a8a88b76589998819166e43f9d8c1d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2376,6 +2376,34 @@ public final class CraftServer implements Server {
@@ -885,6 +885,7 @@ public final class CraftServer implements Server {
this.commandMap.clearCommands();
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
+ io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
@@ -2375,6 +2376,34 @@ public final class CraftServer implements Server {
// Spigot end
// Paper start

View File

@ -7,7 +7,7 @@ Metadata is not meant to persist reload as things break badly with non primitive
This will remove metadata on reload so it does not crash everything if a plugin uses it.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0f8d35e2c37088b98e47e046e40544c4e7bb01c8..90a2ed1b851a948b8ebf4ad6157003db19f1916f 100644
index cffa98b42f1837755c9a8ad95e7517acd4f2d3b5..c67c35e840bc21bbc58d8cf9199ea94d5bb991ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -939,8 +939,16 @@ public final class CraftServer implements Server {
@ -26,4 +26,4 @@ index 0f8d35e2c37088b98e47e046e40544c4e7bb01c8..90a2ed1b851a948b8ebf4ad6157003db
+ // Paper end
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.configuration.PaperConfigurations.registerCommands(this.console);
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper