Skip to content

Commit

Permalink
Fix MorphMessageStore throwing NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Nov 14, 2024
1 parent 2f62c91 commit a2f5c16
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,12 @@ public String get(String key, @Nullable String defaultValue, @Nullable String lo

for (var store : messageStores)
{
var msg = store.get(key, null, null);
var msg = store.get(key, "NIL", null);

// Since we use ConcurrentHashMap, we no longer can use NULL as the default value
// So this might be the only way. Solving this would require a PluginBase update.
if (msg.equals("NIL")) msg = null;

if (msg != null) return msg;
}

Expand Down

0 comments on commit a2f5c16

Please sign in to comment.