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 Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enumPosition of the pack in the load order. -
Method Summary
Modifier 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.DiscoveredDatapack
getCompatibility, getDescription, getName, getRequiredFeatures, getSource, getTitle, isRequired
-
Method Details
-
isEnabled
boolean isEnabled()Gets the enabled state of this pack.- Returns:
- whether the pack is currently enabled
-
setEnabled
void 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.
-
computeDisplayName
Computes the component vanilla Minecraft uses to display this datapack. Includes theDiscoveredDatapack.getSource(),DiscoveredDatapack.getDescription(),DiscoveredDatapack.getName(), and the enabled state.- Returns:
- a new component
-