Package com.ultikits.ultitools.utils
Class PluginYmlReader.PluginYmlInfo
java.lang.Object
com.ultikits.ultitools.utils.PluginYmlReader.PluginYmlInfo
- Enclosing class:
PluginYmlReader
The subset of a module's
plugin.yml this framework needs: its declared
name: and main: (both nullable - absent when the archive has none or
reading failed), its loadAfter: list, and its Bukkit-level softdepend: /
depend: lists (all three never null; empty when absent or reading failed), and its
declared version: and api-version: as text (both nullable, like name and
main), which the load-failure refusal quotes to identify the module.
softDepend was added for UltiEconomy#20's optional-dependency log-level decision: a class
that fails to load only because it references a type belonging to a plugin the module's own
plugin.yml lists under softdepend:, and that plugin is not currently
installed/enabled, is not a defect in the module -- Bukkit's own softdepend:
contract is precisely "this plugin may be absent; the module must tolerate that".
depend is carried alongside it for the same reason -- a module cannot actually be running
at all if a hard depend: were genuinely missing, but the list is threaded through
regardless so a diagnostic message can name it if that ever changes.
- Since:
- 6.3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringstatic final PluginYmlReader.PluginYmlInfoThe empty result every failure path returns.private final Stringprivate final Stringprivate final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe module's declaredplugin.ymlapi-version:value -- the UltiTools API level the module was written for -- as text.The module's declaredplugin.ymldepend:list -- plugin names this module requires to be present.The module's declaredplugin.ymlloadAfter:list.getMain()The module's declaredplugin.ymlmain:value.getName()The module's declaredplugin.ymlname:value.The module's declaredplugin.ymlsoftdepend:list -- plugin names this module integrates with optionally.The module's declaredplugin.ymlversion:value, as text.
-
Field Details
-
EMPTY
The empty result every failure path returns. -
name
-
main
-
loadAfter
-
softDepend
-
depend
-
version
-
apiVersion
-
-
Constructor Details
-
PluginYmlInfo
-
PluginYmlInfo
-
-
Method Details
-
getName
The module's declaredplugin.ymlname:value.- Returns:
- the declared name, or
nullif absent or unreadable - Since:
- 6.3.0
-
getMain
The module's declaredplugin.ymlmain:value.- Returns:
- the declared main class name, or
nullif absent or unreadable - Since:
- 6.3.0
-
getLoadAfter
The module's declaredplugin.ymlloadAfter:list.- Returns:
- the loadAfter list, never
null; empty if absent or unreadable - Since:
- 6.3.0
-
getSoftDepend
The module's declaredplugin.ymlsoftdepend:list -- plugin names this module integrates with optionally.- Returns:
- the softdepend list, never
null; empty if absent or unreadable - Since:
- 6.3.0
-
getDepend
The module's declaredplugin.ymldepend:list -- plugin names this module requires to be present.- Returns:
- the depend list, never
null; empty if absent or unreadable - Since:
- 6.3.0
-
getVersion
The module's declaredplugin.ymlversion:value, as text.- Returns:
- the declared version, or
nullif absent or unreadable - Since:
- 6.3.0
-
getApiVersion
The module's declaredplugin.ymlapi-version:value -- the UltiTools API level the module was written for -- as text.- Returns:
- the declared api-version, or
nullif absent or unreadable - Since:
- 6.3.0
-