2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/server/commands/CommandReload.java
|
|
|
|
+++ b/net/minecraft/server/commands/CommandReload.java
|
2021-06-11 07:00:00 +02:00
|
|
|
@@ -44,6 +44,16 @@
|
2020-06-25 02:00:00 +02:00
|
|
|
return collection1;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ public static void reload(MinecraftServer minecraftserver) {
|
2021-11-21 23:00:00 +01:00
|
|
|
+ ResourcePackRepository resourcepackrepository = minecraftserver.getPackRepository();
|
|
|
|
+ SaveData savedata = minecraftserver.getWorldData();
|
|
|
|
+ Collection<String> collection = resourcepackrepository.getSelectedIds();
|
|
|
|
+ Collection<String> collection1 = discoverNewPacks(resourcepackrepository, savedata, collection);
|
|
|
|
+ minecraftserver.reloadResources(collection1);
|
2020-06-25 02:00:00 +02:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
+
|
2021-11-21 23:00:00 +01:00
|
|
|
public static void register(CommandDispatcher<CommandListenerWrapper> commanddispatcher) {
|
|
|
|
commanddispatcher.register((LiteralArgumentBuilder) ((LiteralArgumentBuilder) net.minecraft.commands.CommandDispatcher.literal("reload").requires((commandlistenerwrapper) -> {
|
2020-06-25 02:00:00 +02:00
|
|
|
return commandlistenerwrapper.hasPermission(2);
|