From e6e9fdca31317a3f6d2f08ca489d03d879bcef97 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Mon, 26 Oct 2020 16:42:56 -0700 Subject: [PATCH] Fix ArrayIndexOutOfBoundsException for Skill Reset command --- Changelog.txt | 3 ++- .../gmail/nossr50/commands/experience/SkillresetCommand.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 7d887480f..a0f452ad9 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,6 @@ Version 2.1.150 - mcMMO Party & Admin Chat have had a rewrite, work was put in to make sure their API would be mostly compatible with the old one mcMMO should now be compatible with 1.16.4's new social features + mcMMO Party & Admin Chat have had a rewrite, work was put in to make sure their API would be mostly compatible with the old one The style and look of admin/party chat is now determined by locale file instead of options in config.yml Improved messages players recieve when they toggle on or off admin or party chat All locale files have had [[]] color codes replaced by & color codes, you can still use [[GOLD]] and stuff if you want @@ -9,6 +9,7 @@ Version 2.1.150 Added new locale string 'Chat.Style.Party' Added new locale string 'Chat.Channel.On' Added new locale string 'Chat.Channel.Off' + Fixed an ArrayIndexOutOfBounds exception when using /skillreset (API) ChatAPI::getPartyChatManager() has been removed (API) ChatAPI::sendPartyChat has been removed (similar functionality can be found in the new ChatManager class) (API) ChatAPI::sendAdminChat has been removed (similar functionality can be found in the new ChatManager class) diff --git a/src/main/java/com/gmail/nossr50/commands/experience/SkillresetCommand.java b/src/main/java/com/gmail/nossr50/commands/experience/SkillresetCommand.java index 1132f7235..3df1976d9 100644 --- a/src/main/java/com/gmail/nossr50/commands/experience/SkillresetCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/experience/SkillresetCommand.java @@ -50,7 +50,7 @@ public class SkillresetCommand implements TabExecutor { skill = null; } else { - skill = PrimarySkillType.getSkill(args[1]); + skill = PrimarySkillType.getSkill(args[0]); } editValues((Player) sender, UserManager.getPlayer(sender.getName()).getProfile(), skill);