Package com.djrapitops.plan.placeholder
Class PlanPlaceholders
java.lang.Object
com.djrapitops.plan.placeholder.PlanPlaceholders
Registry for all placeholders.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
-
Constructor Summary
ConstructorDescriptionPlanPlaceholders
(DBSystem dbSystem, Set<Placeholders> placeholderRegistries, Identifiers identifiers) -
Method Summary
Modifier and TypeMethodDescriptiononPlaceholderRequest
(UUID uuid, String placeholder, List<String> parameters) Look up the placeholder and check if it is registered.void
register
(String name, PlanPlaceholders.PlayerPlaceholderLoader loader) void
register
(String name, Function<PlayerContainer, Serializable> loader) void
registerRaw
(String name, Function<String, Serializable> loader) void
registerStatic
(String name, PlanPlaceholders.StaticPlaceholderLoader loader) void
registerStatic
(String name, Supplier<Serializable> loader)
-
Constructor Details
-
PlanPlaceholders
@Inject public PlanPlaceholders(DBSystem dbSystem, Set<Placeholders> placeholderRegistries, Identifiers identifiers)
-
-
Method Details
-
registerStatic
-
registerStatic
-
register
-
register
-
registerRaw
-
getPlaceholders
-
getStaticPlaceholders
-
onPlaceholderRequest
Look up the placeholder and check if it is registered.- Parameters:
uuid
- the player who is viewing the placeholderplaceholder
- the placeholder to look up to.parameters
- additional placeholder parameters- Returns:
- the value of the placeholder if found, or empty
String
if no value found but the placeholder is registered, otherwisenull
-
getRegisteredServerPlaceholders
-
getRegisteredPlayerPlaceholders
-