Update potions.yml to reflect 1.13 potions and material names.

This commit is contained in:
t00thpick1
2018-09-14 20:50:28 -04:00
parent 44ed35825f
commit 7cc604dbdb
4 changed files with 395 additions and 271 deletions

View File

@ -210,13 +210,10 @@ public class PotionConfig extends ConfigLoader {
return null;
}
String[] parts = ingredient.split(":");
Material material = parts.length > 0 ? Material.getMaterial(parts[0]) : null;
short data = parts.length > 1 ? Short.parseShort(parts[1]) : 0;
Material material = Material.getMaterial(ingredient);
if (material != null) {
return new ItemStack(material, 1, data);
return new ItemStack(material, 1);
}
return null;

View File

@ -38,16 +38,7 @@ public class AlchemyManager extends SkillManager {
StringBuilder list = new StringBuilder();
for (ItemStack ingredient : getIngredients()) {
short durability = ingredient.getDurability();
String string = StringUtils.getPrettyItemString(ingredient.getType()) + (durability != 0 ? ":" + durability : "");
if (string.equals("Long Grass:2")) {
string = "Fern";
}
else if (string.equals("Raw Fish:3")) {
string = "Pufferfish";
}
String string = StringUtils.getPrettyItemString(ingredient.getType());
list.append(", ").append(string);
}