java.lang.Object
io.github.miniplaceholders.api.MiniPlaceholders
MiniPlaceholders
This class allows you to obtain the TagResolver
that other plugins provide based on single Audience
,
2-audience or global placeholders
- Since:
- 1.0.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull TagResolver
getAudienceGlobalPlaceholders
(@NotNull Audience audience) Get the TagResolver based on an Audience and the global placeholdersstatic @NotNull TagResolver
getAudiencePlaceholders
(@NotNull Audience audience) Get the TagResolver based on an Audiencestatic int
Get the amount of expansion registeredstatic @NotNull TagResolver
Get the global placeholdersstatic @NotNull Platform
Get the platformstatic @NotNull TagResolver
getRelationalGlobalPlaceholders
(@NotNull Audience audience, @NotNull Audience otherAudience) Get the relational placeholders based on two audiences, based on the first audience, and the global placeholdersstatic @NotNull TagResolver
getRelationalPlaceholders
(@NotNull Audience audience, @NotNull Audience otherAudience) Get the relational placeholders based on two audiences
-
Method Details
-
getPlatform
Get the platform- Returns:
- the platform
- Since:
- 1.0.0
-
getGlobalPlaceholders
Get the global placeholdersTagResolver resolver = MiniPlaceholders.getGlobalPlaceholders(); Component messageParsed = MiniMessage.miniMessage().deserialize(
String
, resolver);- Returns:
- global placeholders independient of any audience
- Since:
- 1.0.0
- See Also:
-
getAudiencePlaceholders
@NotNull public static @NotNull TagResolver getAudiencePlaceholders(@NotNull @NotNull Audience audience) Get the TagResolver based on an AudienceTagResolver resolver = MiniPlaceholders.getAudiencePlaceholders(
Audience
); Component messageParsed = MiniMessage.miniMessage().deserialize(String
, resolver);- Parameters:
audience
- the audience- Returns:
TagResolver
with placeholders based on an audience- Since:
- 1.0.0
-
getRelationalPlaceholders
@NotNull public static @NotNull TagResolver getRelationalPlaceholders(@NotNull @NotNull Audience audience, @NotNull @NotNull Audience otherAudience) Get the relational placeholders based on two audiencesTagResolver resolver = MiniPlaceholders.getRelationalPlaceholders(
Audience
,Audience
); Component messageParsed = MiniMessage.miniMessage().deserialize(String
, resolver);- Parameters:
audience
- an audienceotherAudience
- another audience- Returns:
- placeholders based on two audiences
- Since:
- 1.0.0
-
getAudienceGlobalPlaceholders
@NotNull public static @NotNull TagResolver getAudienceGlobalPlaceholders(@NotNull @NotNull Audience audience) Get the TagResolver based on an Audience and the global placeholdersTagResolver resolver = MiniPlaceholders.getAudienceGlobalPlaceholders(
Audience
); TagResolver resolver2 = TagResolver.resolver( MiniPlaceholders.getAudienceGlobalPlaceholders(Audience
), MiniPlaceholders.getGlobalPlaceholders() ); // This two resolvers returns the same TagResolver assertEquals(resolver, resolver2); Component messageParsed = MiniMessage.miniMessage().deserialize(String
, resolver);- Parameters:
audience
- the audience- Returns:
TagResolver
with placeholders based on an audience and the global placeholders- Since:
- 1.1.0
-
getRelationalGlobalPlaceholders
@NotNull public static @NotNull TagResolver getRelationalGlobalPlaceholders(@NotNull @NotNull Audience audience, @NotNull @NotNull Audience otherAudience) Get the relational placeholders based on two audiences, based on the first audience, and the global placeholdersTagResolver resolver = MiniPlaceholders.getRelationalGlobalPlaceholders(
Audience
,Audience
); TagResolver resolver2 = TagResolver.resolver( MiniPlaceholders.getRelationalPlaceholders(audience1, audience2), MiniPlaceholders.getAudiencePlaceholders(audience1), MiniPlaceholders.getGlobalPlaceholders() ); // This methods should return the same TagResolver assertEquals(resolver, resolver2); Component messageParsed = MiniMessage.miniMessage().deserialize(String
, resolver);- Parameters:
audience
- an audienceotherAudience
- another audience- Returns:
- the placeholders based on two audiences, placeholders based on the first audience and the global placeholders
- Since:
- 1.1.0
-
getExpansionCount
public static int getExpansionCount()Get the amount of expansion registered- Returns:
- the amount of expansions registered
- Since:
- 1.0.0
-