Refactor extension description

This commit is contained in:
Konicai 2022-08-02 23:22:08 -04:00
parent 40fde6b046
commit a5dc70a3b5
No known key found for this signature in database
GPG key ID: 710D09287708C823
3 changed files with 82 additions and 55 deletions

View file

@ -50,13 +50,35 @@ public interface ExtensionDescription {
@NonNull
String main();
/**
* Gets the extension's major api version
*
* @return the extension's major api version
*/
int majorApiVersion();
/**
* Gets the extension's minor api version
*
* @return the extension's minor api version
*/
int minorApiVersion();
/**
* Gets the extension's patch api version
*
* @return the extension's patch api version
*/
int patchApiVersion();
/**
* Gets the extension's api version
*
* @return the extension's api version
*/
@NonNull
String apiVersion();
default String apiVersion() {
return majorApiVersion() + "." + minorApiVersion() + "." + patchApiVersion();
}
/**
* Gets the extension's description