Remove unnecessary class

This commit is contained in:
HappyPikachu 2015-02-21 23:01:18 -05:00
parent 8f0daba6f1
commit a2f9119c82
2 changed files with 2 additions and 22 deletions

View File

@ -1,19 +0,0 @@
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;
}
}

View File

@ -7,7 +7,6 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import me.blackvein.quests.ItemData;
import me.blackvein.quests.Quester;
import me.blackvein.quests.Quests;
import me.blackvein.quests.util.ColorUtil;
@ -249,12 +248,12 @@ public class ItemStackPrompt extends FixedSetPrompt implements ColorUtil {
}
}
Material mat = ItemData.getMaterial(input);
Material mat = Material.matchMaterial(input.toUpperCase().replace(" ", "_"));
if (mat == null) {
cc.getForWhom().sendRawMessage(RED + Lang.get("itemCreateInvalidName"));
return new NamePrompt();
} else {
System.out.println("name - " + mat.name());
cc.setSessionData("tempName", mat.name());
cc.setSessionData("tempAmount", 1);