mirror of
https://github.com/filoghost/ChestCommands.git
synced 2024-11-25 11:35:32 +01:00
Fix NullPointerException
This commit is contained in:
parent
6ff57d5aa2
commit
a502f64357
@ -60,6 +60,9 @@ public class PlaceholderRegistry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Placeholder> externalPlaceholdersByPlugin = externalPlaceholders.get(identifier);
|
Map<String, Placeholder> externalPlaceholdersByPlugin = externalPlaceholders.get(identifier);
|
||||||
|
if (externalPlaceholdersByPlugin == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// Find exact replacer if plugin name is specified
|
// Find exact replacer if plugin name is specified
|
||||||
if (placeholderMatch.getPluginNamespace() != null) {
|
if (placeholderMatch.getPluginNamespace() != null) {
|
||||||
@ -67,7 +70,7 @@ public class PlaceholderRegistry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise try find the first one registered
|
// Otherwise try find the first one registered
|
||||||
if (externalPlaceholdersByPlugin != null && !externalPlaceholdersByPlugin.isEmpty()) {
|
if (!externalPlaceholdersByPlugin.isEmpty()) {
|
||||||
return externalPlaceholdersByPlugin.values().iterator().next();
|
return externalPlaceholdersByPlugin.values().iterator().next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user