diff --git a/src/main/kotlin/com/github/rushyverse/api/extension/_String.kt b/src/main/kotlin/com/github/rushyverse/api/extension/_String.kt index 63ab7bfa..3a59a649 100644 --- a/src/main/kotlin/com/github/rushyverse/api/extension/_String.kt +++ b/src/main/kotlin/com/github/rushyverse/api/extension/_String.kt @@ -3,16 +3,14 @@ package com.github.rushyverse.api.extension -import com.github.rushyverse.api.translation.Translator -import com.github.rushyverse.api.translation.getComponent +import java.math.BigInteger +import java.util.* import net.kyori.adventure.text.Component import net.kyori.adventure.text.TextComponent import net.kyori.adventure.text.format.NamedTextColor import net.kyori.adventure.text.minimessage.MiniMessage import net.kyori.adventure.text.minimessage.tag.resolver.TagResolver import net.kyori.adventure.text.minimessage.tag.standard.StandardTags -import java.math.BigInteger -import java.util.* /** * MiniMessage instance to deserialize components without strict mode. @@ -265,16 +263,3 @@ public fun StringBuilder.deleteLast(size: Int): StringBuilder { else -> delete(length - size, length) } } - -/** - * If the string contains a dot, it will be considered as a translation path, and will be translated. - * However, if the string doesn't contain a dot, it will be considered as a component. - * @receiver String to translate or to convert to a component. - * @param translator Translator. - * @param locale Locale to use for translation. - * @return The translated component or the component created from the string. - */ -public fun String.toTranslatedComponent(translator: Translator, locale: Locale): Component { - return if (this.contains('.')) translator.getComponent(this, locale) - else this.asComponent() -}