public interface ImageProvider
| Modifier and Type | Method and Description |
|---|---|
ImageRenderer |
getImage(java.lang.String data)
Gets an image renderer for the specified data.
|
@Nullable ImageRenderer getImage(java.lang.String data)
The data passed here will be part of the image URL following the prefix that the provider was registered with. So for example, if the provider was registered for the prefix custom, and the image to be rendered in the Markdown document was [blah](custom:the data], then the string passed where would be the data.
If there is no appropriate image renderer (for example, for the built-in item stack renderers: if the item definition is invalid), this should return null, it should never throw an exception.
data - the data part of the image definition.