From a6cab4d9484a056e0cfb762844a813779939a96f Mon Sep 17 00:00:00 2001 From: CJ Burkey Date: Sun, 15 Dec 2019 17:33:43 -0500 Subject: [PATCH] Update gradle buildfile, fix build warning, release 0.0.18 --- README.md | 2 +- build.gradle | 14 +++++++------- .../cjburkey/claimchunk/cmd/CommandHandler.java | 5 ++--- src/main/resources/plugin.yml | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 0fef271b..5a2b0699 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![ClaimChunk Logo](imgs/icon64.png) ![ClaimChunk Title](imgs/logo_carrier.png) -[![Version Info](https://img.shields.io/badge/Version-0.0.17-brightgreen.svg)](https://github.com/cjburkey01/ClaimChunk/releases) +[![Version Info](https://img.shields.io/badge/Version-0.0.18-brightgreen.svg)](https://github.com/cjburkey01/ClaimChunk/releases) [![Download Info](https://img.shields.io/badge/Spigot-1.15-blue.svg)](https://www.spigotmc.org/resources/claimchunk.44458/) [![Servers Using Claimchunk](https://img.shields.io/bstats/servers/5179?label=Servers)](https://bstats.org/plugin/bukkit/ClaimChunk) [![Players Using Claimchunk](https://img.shields.io/bstats/players/5179?label=Players)](https://bstats.org/plugin/bukkit/ClaimChunk) diff --git a/build.gradle b/build.gradle index e85879de..d6853dff 100644 --- a/build.gradle +++ b/build.gradle @@ -3,14 +3,14 @@ plugins { } group 'com.cjburkey' -version '0.0.18-SNAPSHOT' +version '0.0.18' project.ext.bukkitVersion = '1.15-R0.1-SNAPSHOT' project.ext.spigotVersion = '1.15-R0.1-SNAPSHOT' project.ext.vaultApiVersion = '1.7' -project.ext.worldEditVersion = '7.0.1-SNAPSHOT' -project.ext.worldEditLegacyVersion = '7.0.0-SNAPSHOT' -project.ext.worldGuardVersion = '7.0.1-SNAPSHOT' +project.ext.worldEditCoreVersion = '7.1.0-SNAPSHOT' +project.ext.worldGuardVersion = '7.0.2-SNAPSHOT' +project.ext.worldGuardLegacyVersion = '7.0.0-SNAPSHOT' // Use `gradlew jar` just to build the jar file. // Use `gradlew copyClaimChunkToPluginsDir` to build the jar file and copy the plugin into the /plugins/ directory @@ -18,7 +18,7 @@ project.ext.worldGuardVersion = '7.0.1-SNAPSHOT' // To use these tasks, download Spigot to this file. project.ext.spigotFile = new File('./run/spigot-1.14.4.jar') -sourceCompatibility = 8 +sourceCompatibility = 1.8 repositories { mavenCentral() @@ -34,8 +34,8 @@ dependencies { implementation "org.bukkit:bukkit:$bukkitVersion" implementation "org.spigotmc:spigot-api:$spigotVersion" implementation "net.milkbowl.vault:VaultAPI:$vaultApiVersion" - implementation "com.sk89q.worldedit:worldedit-core:$worldEditVersion" - implementation "com.sk89q.worldguard:worldguard-legacy:$worldEditLegacyVersion" + implementation "com.sk89q.worldedit:worldedit-core:$worldEditCoreVersion" + implementation "com.sk89q.worldguard:worldguard-legacy:$worldGuardLegacyVersion" } compileJava { diff --git a/src/main/java/com/cjburkey/claimchunk/cmd/CommandHandler.java b/src/main/java/com/cjburkey/claimchunk/cmd/CommandHandler.java index 7e5452dd..b4280848 100644 --- a/src/main/java/com/cjburkey/claimchunk/cmd/CommandHandler.java +++ b/src/main/java/com/cjburkey/claimchunk/cmd/CommandHandler.java @@ -20,9 +20,8 @@ public class CommandHandler implements CommandExecutor { void registerCommand(Class cls) { try { - ICommand cmd = cls.newInstance(); - if (cmd != null && cmd.getCommand() != null && !cmd.getCommand().trim().isEmpty() - && !hasCommand(cmd.getCommand())) { + ICommand cmd = cls.getDeclaredConstructor().newInstance(); + if (cmd.getCommand() != null && !cmd.getCommand().trim().isEmpty() && !hasCommand(cmd.getCommand())) { cmds.add(cmd); } } catch (Exception e) { diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index c0f70cc1..cd21c281 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -5,7 +5,7 @@ authors: - 'DeathsGun' database: true prefix: 'ClaimChunk' -version: '0.0.18-SNAPSHOT' +version: '0.0.18' website: 'https://www.spigotmc.org/resources/claimchunk.44458/' softdepend: - 'WorldGuard'