All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.skillw.attsystem.util.StringUtils.kt Maven / Gradle / Ivy

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)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy