Add datapack registration lifecycle event (#11804)

This commit is contained in:
Jake Potrebic
2024-12-28 13:30:43 -08:00
committed by GitHub
parent dac977a106
commit feb8756567
14 changed files with 691 additions and 114 deletions

View File

@@ -9,6 +9,15 @@
LOGGER.warn("Failed to execute reload", throwable);
source.sendFailure(Component.translatable("commands.reload.failure"));
return null;
@@ -24,7 +_,7 @@
}
private static Collection<String> discoverNewPacks(PackRepository packRepository, WorldData worldData, Collection<String> selectedIds) {
- packRepository.reload();
+ packRepository.reload(true); // Paper - will perform a full reload
Collection<String> list = Lists.newArrayList(selectedIds);
Collection<String> disabled = worldData.getDataConfiguration().dataPacks().getDisabled();
@@ -36,6 +_,16 @@
return list;