mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-22 10:36:09 +01:00
Remove unnecessary class
This commit is contained in:
parent
8f0daba6f1
commit
a2f9119c82
@ -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;
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user