December 30, 20177 yr Like Changing the Text Color? That would result in sth like that...: tooltip.add(TextFormatting.GRAY + I18n.format("wand.efficiency") + ": " + (getEfficiency() >= boundDefinition.getPerfectEfficiencyBorder() ? TextFormatting.GOLD : (getEfficiency() >= definition.getPerfectEfficiencyBorder() ? TextFormatting.AQUA : TextFormatting.DARK_BLUE)) + Math.round(getEfficiency()) + "%"); More specifically, im referring to the TextFormatting.sth Edited December 30, 20177 yr by Major Tuvok Spelling mistake
December 31, 20177 yr Subscribe to ItemTooltipEvent to add information to the tooltip of items. To change the color of item names, simply include "§" + any formatting codes before the name of the item in the lang file.
January 7, 20187 yr On 12/31/2017 at 11:07 AM, diesieben07 said: No. Formatting codes should not appear in the lang file. Instead if you need a certain formatting in the language file, do the following: I18n.format("my.language.key", TextFormatting.RED, TextFormatting.RESET); And in the lang file: my.language.key=This is an %1$simportant%2$s word, and here is %1$sanother%2$s. in the addInformation method?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.