Quests/src/main/java/me/blackvein/quests/ItemData.java
2013-11-26 07:37:14 +01:00

20 lines
402 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;
}
}