mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-26 19:17:50 +01:00
20 lines
498 B
Java
20 lines
498 B
Java
package me.blackvein.quests;
|
|
|
|
import org.bukkit.Material;
|
|
|
|
public class ItemData {
|
|
|
|
public static Material getMaterial(String name) {
|
|
Material material = Material.matchMaterial(name);
|
|
if (material == null) {
|
|
name = name.toUpperCase().replace(" ", "_");
|
|
for (Material mat : Material.values()) {
|
|
if (mat.toString().contains(name)) {
|
|
return mat;
|
|
}
|
|
}
|
|
}
|
|
return material;
|
|
}
|
|
}
|