From ec5bf183996de906b9a707d9a08e5ab9cf307cb0 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 6 Mar 2019 02:32:30 +1300 Subject: [PATCH] Fixed null error when using older premium jars --- .../java/me/libraryaddict/disguise/utilities/LibsPremium.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java b/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java index ba279394..981e9d02 100644 --- a/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java +++ b/src/main/java/me/libraryaddict/disguise/utilities/LibsPremium.java @@ -238,6 +238,10 @@ public class LibsPremium { * Add a naughty message for the invalid user ids */ private static String getSanitizedUser(String userID) { + if (userID == null) { + return "N/A"; + } + if (!userID.matches("[0-9]+")) { return String.format("... %s? Am I reading this right?", userID); }