diff --git a/plugin/src/main/java/me/filoghost/chestcommands/placeholder/PlaceholderRegistry.java b/plugin/src/main/java/me/filoghost/chestcommands/placeholder/PlaceholderRegistry.java index 1f76594..59e60a6 100644 --- a/plugin/src/main/java/me/filoghost/chestcommands/placeholder/PlaceholderRegistry.java +++ b/plugin/src/main/java/me/filoghost/chestcommands/placeholder/PlaceholderRegistry.java @@ -60,6 +60,9 @@ public class PlaceholderRegistry { } Map externalPlaceholdersByPlugin = externalPlaceholders.get(identifier); + if (externalPlaceholdersByPlugin == null) { + return null; + } // Find exact replacer if plugin name is specified if (placeholderMatch.getPluginNamespace() != null) { @@ -67,7 +70,7 @@ public class PlaceholderRegistry { } // Otherwise try find the first one registered - if (externalPlaceholdersByPlugin != null && !externalPlaceholdersByPlugin.isEmpty()) { + if (!externalPlaceholdersByPlugin.isEmpty()) { return externalPlaceholdersByPlugin.values().iterator().next(); }