PaperMC/paper-server/patches/sources/net/minecraft/server/commands/ReloadCommand.java.patch

20 lines
1,012 B
Diff
Raw Normal View History

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