mirror of
https://github.com/plexusorg/plugin-yml.git
synced 2024-12-23 00:35:09 +00:00
Add README
This commit is contained in:
parent
04e679a461
commit
2759fc9f1a
1 changed files with 166 additions and 0 deletions
166
README.md
Normal file
166
README.md
Normal file
|
@ -0,0 +1,166 @@
|
||||||
|
# plugin-yml
|
||||||
|
[plugin-yml] is a simple Gradle plugin that generates the `plugin.yml` plugin description file for Bukkit plugins
|
||||||
|
or `bungee.yml` for Bungee plugins based on the Gradle project. Various properties are set automatically (e.g. project
|
||||||
|
name, version or description) and additional properties can be added using a simple DSL.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
[plugin-yml] requires at least **Gradle 4.2**. Using the latest version of Gradle is recommended.
|
||||||
|
|
||||||
|
### Default values
|
||||||
|
|
||||||
|
| Property | Value |
|
||||||
|
| ------------- | ------------- |
|
||||||
|
| Plugin name | Project name |
|
||||||
|
| Plugin version | Project version |
|
||||||
|
| Plugin description | Project description |
|
||||||
|
| Plugin URL (Bukkit only) | `url` project property |
|
||||||
|
|
||||||
|
### Bukkit
|
||||||
|
|
||||||
|
#### Groovy
|
||||||
|
|
||||||
|
```groovy
|
||||||
|
plugins {
|
||||||
|
id 'net.minecrell.plugin-yml.bukkit' version '0.1.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
bukkit {
|
||||||
|
// Default values can be overridden if needed
|
||||||
|
// name = 'TestPlugin'
|
||||||
|
// version = '1.0'
|
||||||
|
// description = 'This is a test plugin'
|
||||||
|
// website = 'https://example.com'
|
||||||
|
|
||||||
|
// Plugin main class (required)
|
||||||
|
main = 'com.example.testplugin.TestPlugin'
|
||||||
|
|
||||||
|
// Other possible properties from plugin.yml (optional)
|
||||||
|
load = 'STARTUP' // or 'POSTWORLD'
|
||||||
|
authors = ['Notch']
|
||||||
|
depend = ['WorldEdit']
|
||||||
|
softDepend = ['Essentials']
|
||||||
|
loadBefore = ['BrokenPlugin']
|
||||||
|
prefix = 'TEST'
|
||||||
|
defaultPermission = 'OP' // 'TRUE', 'FALSE', 'OP' or 'NOT_OP'
|
||||||
|
|
||||||
|
commands {
|
||||||
|
test {
|
||||||
|
description = 'This is a test command!'
|
||||||
|
aliases = ['t']
|
||||||
|
permission = 'testplugin.test'
|
||||||
|
usage = 'Just run the command!'
|
||||||
|
// permissionMessage = 'You may not test this command!'
|
||||||
|
}
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
|
||||||
|
permissions {
|
||||||
|
'testplugin.*' {
|
||||||
|
children = ['testplugin.test']
|
||||||
|
}
|
||||||
|
'testplugin.test' {
|
||||||
|
description = 'Allows you to run the test command'
|
||||||
|
setDefault('OP') // 'TRUE', 'FALSE', 'OP' or 'NOT_OP'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### kotlin-dsl
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
plugins {
|
||||||
|
id("net.minecrell.plugin-yml.bukkit") version "0.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
bukkit {
|
||||||
|
// Default values can be overridden if needed
|
||||||
|
// name = "TestPlugin"
|
||||||
|
// version = "1.0"
|
||||||
|
// description = "This is a test plugin"
|
||||||
|
// website = "https://example.com"
|
||||||
|
|
||||||
|
// 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")
|
||||||
|
depend = listOf("WorldEdit")
|
||||||
|
softDepend = listOf("Essentials")
|
||||||
|
loadBefore = listOf("BrokenPlugin")
|
||||||
|
prefix = "TEST"
|
||||||
|
defaultPermission = BukkitPluginDescription.Permission.Default.OP // TRUE, FALSE, OP or NOT_OP
|
||||||
|
|
||||||
|
commands {
|
||||||
|
"test" {
|
||||||
|
description = "This is a test command!"
|
||||||
|
aliases = listOf("t")
|
||||||
|
permission = "testplugin.test"
|
||||||
|
usage = "Just run the command!"
|
||||||
|
// permissionMessage = "You may not test this command!"
|
||||||
|
}
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
|
||||||
|
permissions {
|
||||||
|
"testplugin.*" {
|
||||||
|
children = listOf("testplugin.test")
|
||||||
|
}
|
||||||
|
"testplugin.test" {
|
||||||
|
description = "Allows you to run the test command"
|
||||||
|
default = BukkitPluginDescription.Permission.Default.OP // TRUE, FALSE, OP or NOT_OP
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Bungee
|
||||||
|
|
||||||
|
#### Groovy
|
||||||
|
|
||||||
|
```groovy
|
||||||
|
plugins {
|
||||||
|
id 'net.minecrell.plugin-yml.bungee' version '0.1.0'
|
||||||
|
}
|
||||||
|
|
||||||
|
bungee {
|
||||||
|
// Default values can be overridden if needed
|
||||||
|
// name = 'TestPlugin'
|
||||||
|
// version = '1.0'
|
||||||
|
// description = 'This is a test plugin'
|
||||||
|
|
||||||
|
// Plugin main class (required)
|
||||||
|
main = 'com.example.testplugin.TestPlugin'
|
||||||
|
|
||||||
|
// Other possible properties from bungee.yml
|
||||||
|
author = 'Notch'
|
||||||
|
depends = ['Yamler']
|
||||||
|
softDepends = ['ServerListPlus']
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### kotlin-dsl
|
||||||
|
|
||||||
|
```kotlin
|
||||||
|
plugins {
|
||||||
|
id("net.minecrell.plugin-yml.bungee") version "0.1.0"
|
||||||
|
}
|
||||||
|
|
||||||
|
bungee {
|
||||||
|
// Default values can be overridden if needed
|
||||||
|
// name = "TestPlugin"
|
||||||
|
// version = "1.0"
|
||||||
|
// description = "This is a test plugin"
|
||||||
|
|
||||||
|
// Plugin main class (required)
|
||||||
|
main = "com.example.testplugin.TestPlugin"
|
||||||
|
|
||||||
|
// Other possible properties from bungee.yml
|
||||||
|
author = "Notch"
|
||||||
|
depends = setOf("Yamler")
|
||||||
|
softDepends = setOf("ServerListPlus")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
[plugin-yml]: https://github.com/Minecrell/plugin-yml
|
Loading…
Reference in a new issue