Quests/src/main/java/me/blackvein/quests/ItemData.java
2014-07-29 08:05:33 -07:00

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