Package io.papermc.paper.datapack
Interface Datapack
- All Superinterfaces:
- DiscoveredDatapack
This is a snapshot of a datapack on the server. It
 won't be updated as datapacks are updated.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enumPosition of the pack in the load order.
- 
Method SummaryModifier and TypeMethodDescriptionComputes the component vanilla Minecraft uses to display this datapack.booleanGets the enabled state of this pack.voidsetEnabled(boolean enabled) Changes the enabled state of this pack.Methods inherited from interface io.papermc.paper.datapack.DiscoveredDatapackgetCompatibility, getDescription, getName, getRequiredFeatures, getSource, getTitle, isRequired
- 
Method Details- 
isEnabledboolean isEnabled()Gets the enabled state of this pack.- Returns:
- whether the pack is currently enabled
 
- 
setEnabledvoid setEnabled(boolean enabled) Changes the enabled state of this pack. Will cause a reload of resources (/minecraft:reload) if any change happens.- Parameters:
- enabled- true to enable, false to disable
- API Note:
- This method may be deprecated in the future as setters on a "snapshot" type are undesirable.
 
- 
computeDisplayNameComputes the component vanilla Minecraft uses to display this datapack. Includes theDiscoveredDatapack.getSource(),DiscoveredDatapack.getDescription(),DiscoveredDatapack.getName(), and the enabled state.- Returns:
- a new component
 
 
-