Skip to content

Commit

Permalink
perf: better code
Browse files Browse the repository at this point in the history
  • Loading branch information
DongShaoNB committed Aug 20, 2024
1 parent f996fb8 commit eb66103
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ object StringUtil {

fun formatTextToComponent(player: Player?, originalText: String): Component {
return BedrockPlayerSupport.miniMessage.deserialize(
formatTextToString(player, originalText)
if (BedrockPlayerSupport.mainConfigManager.getConfigData().enableSupportPAPI()) {
PlaceholderAPI.setPlaceholders(player, originalText)
} else {
originalText
}
)
}

Expand Down

0 comments on commit eb66103

Please sign in to comment.