Преглед изворни кода

Renamed some ConfigEntry elements

Lortseam пре 4 година
родитељ
комит
5691343f3a

+ 2 - 2
src/main/java/me/lortseam/completeconfig/api/ConfigEntry.java

@@ -41,7 +41,7 @@ public @interface ConfigEntry {
      *
      * @return a custom translation key
      */
-    String customTranslationKey() default "";
+    String translationKey() default "";
 
     /**
      * Specifies one or more custom translation keys for this entry's tooltip. If empty, the default single-line or
@@ -49,7 +49,7 @@ public @interface ConfigEntry {
      *
      * @return an array of custom tooltip translation keys
      */
-    String[] customTooltipKeys() default {};
+    String[] tooltipTranslationKeys() default {};
 
     /**
      * Specifies if the entry's field should get updated while at least one listener exists in the entry's class.

+ 2 - 2
src/main/java/me/lortseam/completeconfig/data/Entry.java

@@ -184,11 +184,11 @@ public class Entry<T> extends EntryBase<T> implements DataPart {
             if (!StringUtils.isBlank(id)) {
                 customID = id;
             }
-            String customTranslationKey = annotation.customTranslationKey();
+            String customTranslationKey = annotation.translationKey();
             if (!StringUtils.isBlank(customTranslationKey)) {
                 customTranslation = parentTranslation.root().appendKey(customTranslationKey);
             }
-            String[] customTooltipKeys = annotation.customTooltipKeys();
+            String[] customTooltipKeys = annotation.tooltipTranslationKeys();
             if (customTooltipKeys.length > 0) {
                 if (Arrays.stream(customTooltipKeys).anyMatch(StringUtils::isBlank)) {
                     throw new IllegalAnnotationParameterException("Entry tooltip key(s) must not be blank");