Interface Vanilla
public interface Vanilla
A marker interface for
DataComponents that have a direct counterpart in vanilla Minecraft.
Components implementing this interface are responsible for synchronizing their values
directly with the NMS/Bukkit ItemStack data component system, ensuring that
changes are reflected in the actual game client.
-
Method Summary
-
Method Details
-
apply
void apply(org.bukkit.inventory.ItemStack stack) Applies the value of this component to the specifiedItemStack.This method typically calls
ItemStack.setData(MaterialData)using the appropriate vanillaDataComponentType.- Parameters:
stack- TheItemStackto modify.
-
remove
void remove(org.bukkit.inventory.ItemStack stack) Removes this specific vanilla component from theItemStack.This effectively unsets the data on the stack, reverting it to its default state for that specific vanilla component type.
- Parameters:
stack- TheItemStackto modify.
-