Add plugin description

This commit is contained in:
Minecrell
2018-08-21 21:18:10 +02:00
parent 830b1d4798
commit c43c6cbea2
7 changed files with 62 additions and 13 deletions

View File

@@ -36,6 +36,13 @@ public @interface Plugin {
*/
String version() default "";
/**
* The description of the plugin, explaining what it can be used for.
*
* @return The plugin description, or an empty string if unknown
*/
String description() default "";
/**
* The URL or website of the plugin.
*

View File

@@ -49,6 +49,16 @@ public interface PluginDescription {
return Optional.empty();
}
/**
* Gets the description of the {@link Plugin} within this container.
*
* @return an {@link Optional} with the plugin description, may be empty
* @see Plugin#description()
*/
default Optional<String> getDescription() {
return Optional.empty();
}
/**
* Gets the url or website of the {@link Plugin} within this container.
*