From 61c2f92f183ac6d3d90d154724995d1bfaaab605 Mon Sep 17 00:00:00 2001 From: PikaMug Date: Mon, 29 Jul 2019 22:43:34 -0400 Subject: [PATCH] Do not attempt to translate null quest/action names, fixes #877 --- main/src/main/java/me/blackvein/quests/Quests.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/src/main/java/me/blackvein/quests/Quests.java b/main/src/main/java/me/blackvein/quests/Quests.java index 74377b61e..e32204ed7 100644 --- a/main/src/main/java/me/blackvein/quests/Quests.java +++ b/main/src/main/java/me/blackvein/quests/Quests.java @@ -3333,6 +3333,9 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener * @return Quest or null if not found */ public Quest getQuest(String name) { + if (name == null) { + return null; + } LinkedList qs = quests; for (Quest q : qs) { if (q.getName().equalsIgnoreCase(ChatColor.translateAlternateColorCodes('&', name))) { @@ -3359,6 +3362,9 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener * @return Action or null if not found */ public Action getAction(String name) { + if (name == null) { + return null; + } LinkedList as = events; for (Action a : as) { if (a.getName().equalsIgnoreCase(ChatColor.translateAlternateColorCodes('&', name))) {