From c8d4301ba5359baa59996ec62751ddcf3657da26 Mon Sep 17 00:00:00 2001 From: PikaMug <2267126+PikaMug@users.noreply.github.com> Date: Wed, 29 Apr 2020 02:24:46 -0400 Subject: [PATCH] Do not assume pre-built particle will contain identifier, fixes #1269 --- .../java/me/blackvein/quests/particle/PreBuiltParticle.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main/src/main/java/me/blackvein/quests/particle/PreBuiltParticle.java b/main/src/main/java/me/blackvein/quests/particle/PreBuiltParticle.java index e755c636d..e49d9804b 100644 --- a/main/src/main/java/me/blackvein/quests/particle/PreBuiltParticle.java +++ b/main/src/main/java/me/blackvein/quests/particle/PreBuiltParticle.java @@ -89,6 +89,10 @@ public enum PreBuiltParticle { * @return the PreBuiltParticle represented by the specified identifier */ public static PreBuiltParticle fromIdentifier(String identifier) { - return valueOf(identifier); + try { + return valueOf(identifier); + } catch (IllegalArgumentException e) { + return null; + } } }