PaperMC/paper-server/nms-patches/net/minecraft/server/commands/CommandReload.patch
CraftBukkit/Spigot 43702a9e10 Update to Minecraft 1.18-pre5
By: md_5 <git@md-5.net>
2021-11-22 09:00:00 +11:00

19 lines
1 KiB
Diff

--- a/net/minecraft/server/commands/CommandReload.java
+++ b/net/minecraft/server/commands/CommandReload.java
@@ -44,6 +44,16 @@
return collection1;
}
+ // CraftBukkit start
+ public static void reload(MinecraftServer minecraftserver) {
+ ResourcePackRepository resourcepackrepository = minecraftserver.getPackRepository();
+ SaveData savedata = minecraftserver.getWorldData();
+ Collection<String> collection = resourcepackrepository.getSelectedIds();
+ Collection<String> collection1 = discoverNewPacks(resourcepackrepository, savedata, collection);
+ minecraftserver.reloadResources(collection1);
+ }
+ // CraftBukkit end
+
public static void register(CommandDispatcher<CommandListenerWrapper> commanddispatcher) {
commanddispatcher.register((LiteralArgumentBuilder) ((LiteralArgumentBuilder) net.minecraft.commands.CommandDispatcher.literal("reload").requires((commandlistenerwrapper) -> {
return commandlistenerwrapper.hasPermission(2);