/** * Register a new placeholder hook * * @param identifier Identifier of the placeholder -> "%(identifier)_(args...)% * @param placeholderHook implementing class that contains the onPlaceholderRequest method which * is called when a value is needed for the specific placeholder * @return true if the hook was successfully registered, false if there is already a hook * registered for the specified identifier */ public static boolean registerPlaceholderHook(String identifier, PlaceholderHook placeholderHook) { Validate.notNull(identifier, "Identifier can not be null"); Validate.notNull(placeholderHook, "Placeholderhook can not be null"); if (isRegistered(identifier)) { return false; } placeholders.put(identifier.toLowerCase(), placeholderHook); return true; }