Skip to content

1.20.2 Upgrading Guide

Theme Customization

The theme system was fully introduced in 1.20.2, allowing users to change all the text colors, which means you should no longer hardcode any color via Component#withStyle. Instead, use things like IThemeHelper.get().success(componentOrString) to highlight your text.

Also, there is a IThemeHelper.get().isLightColorScheme() method provided to check if the current background color is light or dark, so you can adjust your text color accordingly.

Line Spacing

Now, There is a 2-pixel line spacing between each line. You can use tooltip.setLineMargin(index, side, margin) to adjust the margin for each line.

You should only modify the margins for the lines that you added.

For example, if you added the last line, to remove the spacing between the last two lines:


For the rule of calculating margins, see Margin collapsing.


Now, the whole tooltip is also an IElement, so some callbacks' parameters are changed. You need to get the current tooltip using rootElement.getTooltip().


In the last major version, I forgot to change the signature of IServerExtensionProvider#getGroups. Now it is fixed to respect the changes in IServerDataProvider.