From 7109633a67301de9edb0b6e732ede925b4e12fa1 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 22 Jan 2020 20:49:01 +1300 Subject: [PATCH] Fixes #424 error with grabskin no name provided --- .../me/libraryaddict/disguise/commands/GrabSkinCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/me/libraryaddict/disguise/commands/GrabSkinCommand.java b/src/main/java/me/libraryaddict/disguise/commands/GrabSkinCommand.java index 240898c2..77cd964a 100644 --- a/src/main/java/me/libraryaddict/disguise/commands/GrabSkinCommand.java +++ b/src/main/java/me/libraryaddict/disguise/commands/GrabSkinCommand.java @@ -54,7 +54,7 @@ public class GrabSkinCommand implements CommandExecutor { } if (tName == null && args[0].matches("(.*\\/)?[a-zA-Z0-9_-]{3,20}\\.png")) { - tName = tName.substring(args[0].lastIndexOf("/") + 1, args[0].lastIndexOf(".")); + tName = args[0].substring(args[0].lastIndexOf("/") + 1, args[0].lastIndexOf(".")); if (DisguiseUtilities.hasGameProfile(tName)) { tName = null;