Annotation Interface ConfigEntry
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionA single trimmed{key}token resolves through the module catalogue, so the entry's comment follows the server's language: start-up and/ul reloadrewrite the framework's own comment lines in the current language, and a write that inserts the entry writes its comment; a save, an operator change or a panel edit rewrites no comment.The setting's dotted path in the file.String[]Comment texts earlier versions of the module shipped for this entry - for example the literal comment it had beforecomment()became a{key}token whose catalogue wording then changed.
-
Element Details
-
path
String pathThe setting's dotted path in the file. An empty path (the default) uses the field name. The file can hold the setting as nested keys, as one flat dotted key such asfeatures.chat: false, or in any other split at its dots. For example,a.b.ccan be read asa.b:with a child keyc. Reads and writes use the form already in the file and never add a second one. Load and reload reject a setting written in more than one form, even if the values agree. Dots inside the keys of a bound map are part of those keys, not path separators.ConditionalOnConfigandAbstractConfigEntity.isPresentInFile(String)resolve paths the same way.- Returns:
- the nested config entry path
- Default:
""
-
comment
String commentA single trimmed{key}token resolves through the module catalogue, so the entry's comment follows the server's language: start-up and/ul reloadrewrite the framework's own comment lines in the current language, and a write that inserts the entry writes its comment; a save, an operator change or a panel edit rewrites no comment. Only comment lines the framework can identify as its own are rewritten: the entry's comment, as a whole or as its trailing run of lines, equal byte for byte (at the entry's column,"# "and the text) to the framework's rendering of the token in a catalogue the module's jar ships, of a text an earlier module version shipped and listed inpreviousComments(), of the text the module resolves now, or of the bare token. Any other comment line above the entry - an operator's note, a framework comment the operator edited - is kept byte for byte, permanently. Literal comments are only supplied for new entries and existing operator comments are retained. Comments on individual list items are kept only while the list keeps its length - the same as Bukkit, which keeps none.- Returns:
- the literal comment or single catalogue-key token
- Default:
""
-
previousComments
String[] previousCommentsComment texts earlier versions of the module shipped for this entry - for example the literal comment it had beforecomment()became a{key}token whose catalogue wording then changed. On a token entry, a comment in a server's file that equals one of these texts in the exact form the framework writes (the entry's column,"# "and the text) counts as written by the framework: it is replaced by the current catalogue text and follows the server's language from then on. A comment that differs in any character stays the operator's and is kept byte for byte. Ignored on an entry whose comment is literal, which is never rewritten.- Returns:
- the texts earlier versions shipped, one element per comment (a text may span lines)
- Since:
- 6.3.0
- Default:
{}
-