/** * Splits the localized text on "|" into a String[]. * * @param unloc * The unlocalized string. * @param args * The args to format the localized text with. * @return A localized list of strings. */ public @Nonnull String[] localizeList(@Nonnull String unloc, @Nonnull String... args) { return splitList(localize(unloc, (Object[]) args)); }
/** * Splits the localized text on "|" into a String[]. * * @param unloc * The unlocalized string. * @return A localized list of strings. */ public @Nonnull String[] localizeList(@Nonnull String unloc) { return splitList(localize(unloc)); }
/** * Get the detail for this itemstack * * @param stack * @return a list of <code>String</code>s to be bulleted under the enchantment */ default @Nonnull String[] getTooltipDetails(@Nonnull ItemStack stack) { final String unloc = "description." + ((Enchantment) this).getName(); final String loc = EnderCore.lang.localizeExact(unloc); return unloc.equals(loc) ? new String[0] : EnderCore.lang.splitList(loc); }