diff --git a/AnnotationsProcessor/src/main/java/com/christophecvb/touchportal/annotations/processor/SettingProcessor.java b/AnnotationsProcessor/src/main/java/com/christophecvb/touchportal/annotations/processor/SettingProcessor.java index a58e28d..6e27f22 100644 --- a/AnnotationsProcessor/src/main/java/com/christophecvb/touchportal/annotations/processor/SettingProcessor.java +++ b/AnnotationsProcessor/src/main/java/com/christophecvb/touchportal/annotations/processor/SettingProcessor.java @@ -38,9 +38,14 @@ public static Pair process(TouchPortalPluginAnnota if (!setting.tooltip().body().isEmpty()) { JsonObject tooltip = new JsonObject(); - tooltip.addProperty(SettingHelper.Tooltip.TITLE, setting.tooltip().title()); tooltip.addProperty(SettingHelper.Tooltip.BODY, setting.tooltip().body()); - tooltip.addProperty(SettingHelper.Tooltip.DOC_URL, setting.tooltip().docUrl()); + + if (!setting.tooltip().title().isEmpty()) { + tooltip.addProperty(SettingHelper.Tooltip.TITLE, setting.tooltip().title()); + } + if (!setting.tooltip().docUrl().isEmpty()) { + tooltip.addProperty(SettingHelper.Tooltip.DOC_URL, setting.tooltip().docUrl()); + } jsonSetting.add(SettingHelper.TOOLTIP, tooltip); }