Class APIUtils
java.lang.Object
com.hypherionmc.simplerpc.api.utils.APIUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<DimensionSection.Dimension>Tries to find a matching Biome/Dimension or both override from the configstatic StringparseAndLimit(String input, int limit) Helper method to resolve placeholders, and limit the output string length.static StringworldNameToReadable(String name) Helper method to make the world name a bit nicer to read
-
Field Details
-
CUR_DIR
-
-
Constructor Details
-
APIUtils
public APIUtils()
-
-
Method Details
-
worldNameToReadable
Helper method to make the world name a bit nicer to read- Parameters:
name- The raw world name- Returns:
- The formatted world name
-
findDimension
@Internal public static Optional<DimensionSection.Dimension> findDimension(List<DimensionSection.Dimension> list) Tries to find a matching Biome/Dimension or both override from the config- Parameters:
list- A copy of the loaded Dimension overrides- Returns:
- The resolved RPC that will be displayed
-
parseAndLimit
Helper method to resolve placeholders, and limit the output string length. This is required for some RPC fields- Parameters:
input- The Raw string before formattinglimit- The length to limit the return string to- Returns:
- The formatted, and trimmed string
-