Add support for single author on Bukkit and set it by default

This commit is contained in:
Minecrell 2017-09-29 17:02:54 +02:00
parent dd1896d0a2
commit e58781164e
4 changed files with 8 additions and 4 deletions

View file

@ -14,6 +14,7 @@ name, version or description) and additional properties can be added using a sim
| Plugin version | Project version |
| Plugin description | Project description |
| Plugin URL (Bukkit only) | `url` project property |
| Plugin author | `author` project property |
### Bukkit
@ -30,13 +31,14 @@ bukkit {
// version = '1.0'
// description = 'This is a test plugin'
// website = 'https://example.com'
// author = 'Notch'
// Plugin main class (required)
main = 'com.example.testplugin.TestPlugin'
// Other possible properties from plugin.yml (optional)
load = 'STARTUP' // or 'POSTWORLD'
authors = ['Notch']
authors = ['Notch', 'Notch2']
depend = ['WorldEdit']
softDepend = ['Essentials']
loadBefore = ['BrokenPlugin']
@ -79,13 +81,14 @@ bukkit {
// version = "1.0"
// description = "This is a test plugin"
// website = "https://example.com"
// author = "Notch"
// Plugin main class (required)
main = "com.example.testplugin.TestPlugin"
// Other possible properties from plugin.yml (optional)
load = BukkitPluginDescription.PluginLoadOrder.STARTUP // or POSTWORLD
authors = listOf("Notch")
authors = listOf("Notch", "Notch2")
depend = listOf("WorldEdit")
softDepend = listOf("Essentials")
loadBefore = listOf("BrokenPlugin")

View file

@ -36,7 +36,7 @@ class BukkitPlugin : PlatformPlugin<BukkitPluginDescription>("Bukkit", "plugin.y
description.version = description.version ?: project.version.toString()
description.description = description.description ?: project.description
description.website = description.website ?: project.findProperty("url")?.toString()
// TODO: Authors
description.author = description.author ?: project.findProperty("author")?.toString()
}
override fun validate(description: BukkitPluginDescription) {

View file

@ -37,6 +37,7 @@ class BukkitPluginDescription(project: Project) : Serializable {
var main: String? = null
var description: String? = null
var load: PluginLoadOrder? = null
var author: String? = null
var authors: List<String>? = null
var website: String? = null
var depend: List<String>? = null

View file

@ -35,7 +35,7 @@ class BungeePlugin : PlatformPlugin<BungeePluginDescription>("Bungee", "bungee.y
description.name = description.name ?: project.name
description.version = description.version ?: project.version.toString()
description.description = description.description ?: project.description
// TODO: Author
description.author = description.author ?: project.findProperty("author")?.toString()
}
override fun validate(description: BungeePluginDescription) {