Last active
March 18, 2017 10:47
-
-
Save remi6397/7e85efc46a13a340384722797998078d to your computer and use it in GitHub Desktop.
Gradle build for Spigot/Bukkit API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'java' | |
apply plugin: 'maven' | |
group = 'xyz.myname.pluginname' | |
version = '1.0.0-SNAPSHOT' | |
archivesBaseName = 'PluginName' | |
// May be 1.7 (jdk7) from now | |
sourceCompatibility = 1.6 | |
targetCompatibility = 1.6 | |
repositories { | |
jcenter() | |
mavenCentral() | |
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" } | |
// maven { url "https://anexampleextension.com/repo" } | |
} | |
dependencies { | |
// compile group: 'com.anexampledev', name: 'anexampleextension', version: '1.2.3' | |
compile group: 'org.spigotmc', name: 'spigot-api', version: '1.11.2-R0.1-SNAPSHOT' | |
} | |
processResources { | |
// filters 'plugin.yml' | |
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [ | |
'VERSION': project.version.split('-')[0] | |
] | |
} | |
jar { | |
// Needed if we want to bundle "extensions" | |
// | |
// from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } { | |
// exclude "LICENSE.*" | |
// exclude "license.*" | |
// exclude "plugin.yml" | |
// exclude "META-INF" | |
// } | |
} | |
task wrapper(type: Wrapper) { | |
// Works best with spigot | |
gradleVersion = '2.14.1' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Plugin Name' | |
author: 'My Name' | |
version: @VERSION@ | |
main: xyz.myname.pluginname.PluginName | |
permissions: | |
pluginname.*: | |
description: Get access to all functions of Plugin Name. | |
default: op | |
children: | |
pluginname.bypass: true | |
pluginname.toggle: true | |
pluginname.toggle.others: true | |
pluginname.bypass: | |
description: Bypass Plugin Name protection. | |
default: op | |
pluginname.toggle: | |
description: Toggle Plugin Name bypass. | |
default: op | |
pluginname.toggle.others: | |
description: Toggle Plugin Name bypass for other players. | |
default: op | |
children: | |
pluginname.toggle: true | |
commands: | |
toggleplugin: | |
description: 'Toggle Plugin Name bypass' | |
permission: pluginname.toggle | |
permission-message: "[Plugin Name] You don't have permission to do that!" | |
usage: | | |
Plugin Name by My Name | |
/toggleplugin [player] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment