mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-14 22:55:54 +01:00
Do not attempt to translate null quest/action names, fixes #877
This commit is contained in:
parent
8cd3ae6076
commit
61c2f92f18
@ -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<Quest> 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<Action> as = events;
|
||||
for (Action a : as) {
|
||||
if (a.getName().equalsIgnoreCase(ChatColor.translateAlternateColorCodes('&', name))) {
|
||||
|
Loading…
Reference in New Issue
Block a user