From 9b7ee19141c8f1e2b3982e71e1fea9b62f48f86b Mon Sep 17 00:00:00 2001 From: McDaddyTalk Date: Sun, 14 Mar 2021 12:16:07 -0400 Subject: [PATCH] Fix for #97: Commands and UUID --- pom.xml | 54 +++++++++++++------ .../treasurechest/v8/util/BukkitUtil.java | 2 +- src/main/resources/plugin.yml | 4 +- 3 files changed, 40 insertions(+), 20 deletions(-) diff --git a/pom.xml b/pom.xml index 551320d..72163f3 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.mtihc.minecraft.treasurechest.v8.plugin TreasureChest - 8.5 + 8.6 TreasureChest http://dev.bukkit.org/server-mods/treasurechest/ @@ -11,28 +11,31 @@ spigot-repo https://hub.spigotmc.org/nexus/content/repositories/snapshots/ - - papermc - https://papermc.io/repo/repository/maven-public/ - + - sk89q-repo - http://maven.sk89q.com/repo/ + jitpack.io + https://jitpack.io + - milkbowl-repo + vault-repo http://nexus.hc.to/content/repositories/pub_releases + + + enginehub-maven + http://maven.enginehub.org/repo/ + org.apache.maven.plugins maven-compiler-plugin - 2.0.2 + 3.8.1 - 1.6 - 1.6 + 1.8 + 1.8 @@ -41,20 +44,37 @@ org.spigotmc spigot-api - 1.14.1-R0.1-SNAPSHOT + 1.16.5-R0.1-SNAPSHOT provided + + + net.milkbowl.vault + VaultAPI + 1.7 + + + org.bukkit + bukkit + + + + + + com.sk89q.worldedit worldedit-bukkit - 7.0.0-SNAPSHOT + 7.2.0-SNAPSHOT provided + + - net.milkbowl.vault - VaultAPI - 1.6 - compile + com.sk89q.worldedit + worldedit-core + 7.2.0-SNAPSHOT + provided diff --git a/src/main/java/com/mtihc/minecraft/treasurechest/v8/util/BukkitUtil.java b/src/main/java/com/mtihc/minecraft/treasurechest/v8/util/BukkitUtil.java index f7c3e05..dc80326 100644 --- a/src/main/java/com/mtihc/minecraft/treasurechest/v8/util/BukkitUtil.java +++ b/src/main/java/com/mtihc/minecraft/treasurechest/v8/util/BukkitUtil.java @@ -13,7 +13,7 @@ public static OfflinePlayer findOfflinePlayer(String playerName) throws CommandE OfflinePlayer p = null; OfflinePlayer[] offlinePlayers = Bukkit.getOfflinePlayers(); for (OfflinePlayer offlinePlayer : offlinePlayers) { - if (offlinePlayer.getName().toLowerCase() == playerName.toLowerCase()) { + if (offlinePlayer.getName().equalsIgnoreCase(playerName)) { if (p != null) { throw new CommandException("Found multiple players named \"" + playerName + "\". Try using a UUID instead."); } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 2f4db3a..56b796c 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -6,8 +6,8 @@ startup: postworld url: http://dev.bukkit.org/server-mods/treasurechest/ depend: [] softdepend: [Vault, WorldEdit] -version: 8.5 -api-version: 1.14 +version: 8.6 +api-version: 1.16 commands: treasurechest: aliases: [tchest]