Package com.kamikazejam.kamicommon.util
Class SoftPlaceholderAPI
java.lang.Object
com.kamikazejam.kamicommon.util.SoftPlaceholderAPI
A utility class for soft PlaceholderAPI integration
This class will utilize PlaceholderAPI if it is present on the server, safely ignoring replacements if it is not.
This class will utilize PlaceholderAPI if it is present on the server, safely ignoring replacements if it is not.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull StringsetPlaceholders(@Nullable OfflinePlayer player, String s) Attempts to set placeholders in the given string for the given player if PlaceholderAPI is present
If PlaceholderAPI is not present, the string is returned unchanged
This method will warn in the console if PlaceholderAPI is not found andis trueinvalid reference
Config#isWarnAboutPlaceholders()setPlaceholders(@Nullable OfflinePlayer player, @NotNull List<String> strings) Attempts to set placeholders in the given list of strings for the given player if PlaceholderAPI is present
If PlaceholderAPI is not present, the list is returned unchanged
This method will warn in the console if PlaceholderAPI is not found andis trueinvalid reference
Config#isWarnAboutPlaceholders()
-
Constructor Details
-
SoftPlaceholderAPI
public SoftPlaceholderAPI()
-
-
Method Details
-
setPlaceholders
@NotNull public static @NotNull String setPlaceholders(@Nullable @Nullable OfflinePlayer player, String s) Attempts to set placeholders in the given string for the given player if PlaceholderAPI is present
If PlaceholderAPI is not present, the string is returned unchanged
This method will warn in the console if PlaceholderAPI is not found andis trueinvalid reference
Config#isWarnAboutPlaceholders() -
setPlaceholders
@NotNull public static @NotNull List<String> setPlaceholders(@Nullable @Nullable OfflinePlayer player, @NotNull @NotNull List<String> strings) Attempts to set placeholders in the given list of strings for the given player if PlaceholderAPI is present
If PlaceholderAPI is not present, the list is returned unchanged
This method will warn in the console if PlaceholderAPI is not found andis trueinvalid reference
Config#isWarnAboutPlaceholders()
-