diff --git a/src/main/kotlin/cc/dsnb/bedrockplayersupport/util/StringUtil.kt b/src/main/kotlin/cc/dsnb/bedrockplayersupport/util/StringUtil.kt index 8963b96..c9cd398 100644 --- a/src/main/kotlin/cc/dsnb/bedrockplayersupport/util/StringUtil.kt +++ b/src/main/kotlin/cc/dsnb/bedrockplayersupport/util/StringUtil.kt @@ -22,18 +22,6 @@ object StringUtil { return stringBuilder.toString() } - fun formatTextToString(player: Player?, originalText: String): String { - return BedrockPlayerSupport.legacySection.serialize( - BedrockPlayerSupport.miniMessage.deserialize( - if (BedrockPlayerSupport.mainConfigManager.getConfigData().enableSupportPAPI()) { - PlaceholderAPI.setPlaceholders(player, originalText) - } else { - originalText - } - ) - ) - } - fun formatTextToComponent(player: Player?, originalText: String): Component { return BedrockPlayerSupport.miniMessage.deserialize( if (BedrockPlayerSupport.mainConfigManager.getConfigData().enableSupportPAPI()) { @@ -44,4 +32,10 @@ object StringUtil { ) } + fun formatTextToString(player: Player?, originalText: String): String { + return BedrockPlayerSupport.legacySection.serialize( + formatTextToComponent(player, originalText) + ) + } + } \ No newline at end of file