Merge pull request #74 from AuthMe-Team/version-number

Merge
This commit is contained in:
DNx 2015-11-30 11:05:22 +07:00
commit cb0d421963
2 changed files with 9 additions and 4 deletions

View File

@ -185,9 +185,14 @@ public class AuthMe extends JavaPlugin {
// TODO: enhance this
private void setupConstants() {
String versionRaw = this.getDescription().getVersion();
pluginVersion = versionRaw.substring(0, versionRaw.indexOf("-b"));
String buildRaw = versionRaw.substring(1, versionRaw.indexOf("-b"));
pluginBuildNumber = buildRaw.substring(0, buildRaw.indexOf("-t"));
int index = versionRaw.lastIndexOf("-");
if (index != -1) {
pluginVersion = versionRaw.substring(0, index);
pluginBuildNumber = versionRaw.substring(index + 1);
if (pluginBuildNumber.startsWith("b")) {
pluginBuildNumber = pluginBuildNumber.substring(1);
}
}
}
/**

View File

@ -3,7 +3,7 @@ authors: [${pluginAuthors}]
website: ${project.url}
description: ${project.description}
main: ${mainClass}
version: ${project.version}-b${buildNumber}-t${build.time}
version: ${project.version}-b${buildNumber}
softdepend:
- Vault
- PermissionsBukkit