Package com.andrei1058.spigot.sidebar
Class SidebarLine
java.lang.Object
com.andrei1058.spigot.sidebar.SidebarLine
- Direct Known Subclasses:
SidebarLineAnimated
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract @NotNull String
getLine()
Get static message.getTrimReplacePlaceholders
(@Nullable org.bukkit.entity.Player papiSubject, @Nullable Integer limit, Collection<PlaceholderProvider> placeholders) Use this for tab prefix-suffix or scoreboard title.static @NotNull String
getTrimReplacePlaceholders
(String scope, @Nullable org.bukkit.entity.Player papiSubject, @Nullable Integer limit, Collection<PlaceholderProvider> placeholders) getTrimReplacePlaceholdersScore
(@Nullable org.bukkit.entity.Player papiSubject, @Nullable Integer limit, Collection<PlaceholderProvider> placeholders) boolean
Deprecated.boolean
boolean
static void
markHasPlaceholders
(@NotNull SidebarLine text, Collection<PlaceholderProvider> placeholders) Search for placeholders and mark line as placeholder dependent.void
setHasPlaceholders
(boolean value) Deprecated, for removal: This API element is subject to removal in a future version.void
setInternalPlaceholders
(boolean internalPlaceholders) Mark line as internal placeholder support dependent.void
setPapiPlaceholders
(boolean papiPlaceholders) Mark line as PAPI dependent.
-
Constructor Details
-
SidebarLine
public SidebarLine()
-
-
Method Details
-
getLine
Get static message. -
setHasPlaceholders
Deprecated, for removal: This API element is subject to removal in a future version.Toggle placeholders verification.- Parameters:
value
- true if it has placeholders.
-
isHasPlaceholders
Deprecated.- Returns:
- if contains placeholders.
-
markHasPlaceholders
public static void markHasPlaceholders(@NotNull @NotNull SidebarLine text, Collection<PlaceholderProvider> placeholders) Search for placeholders and mark line as placeholder dependent. -
getTrimReplacePlaceholders
public String getTrimReplacePlaceholders(@Nullable @Nullable org.bukkit.entity.Player papiSubject, @Nullable @Nullable Integer limit, Collection<PlaceholderProvider> placeholders) Use this for tab prefix-suffix or scoreboard title.- Parameters:
papiSubject
- papi player subject.limit
- char limit.placeholders
- internal placeholders.- Returns:
- parsed string.
-
getTrimReplacePlaceholdersScore
@Experimental public String getTrimReplacePlaceholdersScore(@Nullable @Nullable org.bukkit.entity.Player papiSubject, @Nullable @Nullable Integer limit, Collection<PlaceholderProvider> placeholders) -
getTrimReplacePlaceholders
@NotNull public static @NotNull String getTrimReplacePlaceholders(String scope, @Nullable @Nullable org.bukkit.entity.Player papiSubject, @Nullable @Nullable Integer limit, Collection<PlaceholderProvider> placeholders) -
isPapiPlaceholders
public boolean isPapiPlaceholders()- Returns:
- if line is PAPI dependent.
-
setPapiPlaceholders
public void setPapiPlaceholders(boolean papiPlaceholders) Mark line as PAPI dependent. -
isInternalPlaceholders
public boolean isInternalPlaceholders()- Returns:
- if line is dependent on internal placeholders.
-
setInternalPlaceholders
public void setInternalPlaceholders(boolean internalPlaceholders) Mark line as internal placeholder support dependent.
-