provideComponentDefaults

fun provideComponentDefaults(event: Event?, vararg replacements: TextReplacements?): HashMap<String, Component?>

Similar to provideStringDefaults, but rather than strings this returns Component equivalents. These can be used for (almost) everything text related in Minecraft.

Return

A prefilled map of replacements.

Parameters

event

An optional event, that can provide context-based replacements. If null, context-based replacements will not be included in the returned map.

replacements

The replacements that should be included in the returned map. If null, an empty map will be returned. If the ALL constant is included in this array, it will include all predefined replacements, but should not be used in combination with others.