com.skillw.attsystem.util.StringUtils.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AttributeSystem Show documentation
Show all versions of AttributeSystem Show documentation
Bukkit Attribute Engine Plugin.
The newest version!
package com.skillw.attsystem.util
import org.bukkit.Material
import taboolib.library.xseries.XMaterial
object StringUtils {
@JvmStatic
fun String.material(): Material? {
val xMaterial = XMaterial.matchXMaterial(this)
return if (xMaterial.isPresent) {
xMaterial.get().parseMaterial()
} else {
Material.matchMaterial(this)
}
}
}