Package io.papermc.paper.datapack
Interface DatapackManager
-
Method Summary
Modifier and TypeMethodDescriptionGets the enabled datapacks.Gets a datapack by name.getPacks()
Gets the available datapacks.void
Triggers a refresh of the available and selected datapacks.
-
Method Details
-
refreshPacks
void refreshPacks()Triggers a refresh of the available and selected datapacks. This can find new datapacks, remove old ones, and update the metadata for existing datapacks. Some of these changes will only take effect after the nextServer.reloadData()
or/minecraft:reload
. -
getPack
Gets a datapack by name. May require callingrefreshPacks()
before to get the latest pack information.- Parameters:
name
- the name/id of the datapack- Returns:
- the datapack, or null if not found
-
getPacks
@Unmodifiable Collection<Datapack> getPacks()Gets the available datapacks. May require callingrefreshPacks()
before to get the latest pack information.- Returns:
- all the packs known to the server
-
getEnabledPacks
@Unmodifiable Collection<Datapack> getEnabledPacks()Gets the enabled datapacks. May require callingrefreshPacks()
before to get the latest pack information.- Returns:
- all the packs which are currently enabled
-