Open up PluginDescriptionFile for extension

XMLWordPrintable

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None
    • Environment:

      Java 16, Windows 10

    • This server is running CraftBukkit version 3034-Spigot-1ad8354-0791e54 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
    • Yes

      The PluginDescriptionFile api is very much geared towards JavaPlugins, even though every PluginLoader must be able to return an instance given any type of file. PluginLoaders should be able to load their plugins using the File and PluginDescriptionFile, but custom pluginloader might want to make use of extra properties in the plugin's description that can't be represented by PluginDescriptionFile currently.

      I therefore propose that PluginDescriptionFile is changed so that it is no longer final, and its package-private constructors become protected. PluginLoaders can then return an instance of a subclass of PluginDescriptionFile in getPluginDescription

      Alternatively, the PluginAwareness api could be opened up for extension so that the extra properties can be specified as awarenesses. Currently only PluginAwaraness can only be implemented by PluginAwareness.Flags. Any other type of plugin awareness will be turned into a dummy value by the Yaml instance in PluginDescriptionFile. PluginLoader could get an extra method: `public Class<? extends PluginAwareness>[] getAwareness()` which returns the awareness types that this PluginLoader supports.

            Assignee:
            Unassigned
            Reporter:
            Jan Boerman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: