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)
-
Method Summary
Modifier and TypeMethodDescriptiononPlaceholderRequest(PlayerContainer player, String placeholder, List<String> parameters)
Look up the placeholder and check if it is registered.onPlaceholderRequest(UUID uuid, String placeholder, List<String> parameters)
void
register(String name, PlanPlaceholders.PlayerPlaceholderLoader loader)
void
register(String name, Function<PlayerContainer,Serializable> loader)
void
registerRaw(String name, BiFunction<String,PlayerContainer,Serializable> loader)
void
registerStatic(String name, PlanPlaceholders.StaticPlaceholderLoader loader)
void
registerStatic(String name, Supplier<Serializable> loader)
-
Constructor Details
-
PlanPlaceholders
-
-
Method Details
-
registerStatic
-
registerStatic
-
register
-
register
-
registerRaw
-
getPlaceholders
-
getStaticPlaceholders
-
onPlaceholderRequest
-
onPlaceholderRequest
public String onPlaceholderRequest(PlayerContainer player, String placeholder, List<String> parameters)Look up the placeholder and check if it is registered.- Parameters:
player
- 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
-