Change potioneffect to potioneffecttype. Fix not having it in displayed opens.

This commit is contained in:
Andrew 2013-11-06 22:23:46 +13:00
parent 7a9dd70990
commit f6113cb774
2 changed files with 6 additions and 2 deletions

View File

@ -235,13 +235,15 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
}
// Parse to potion effect
} else if (param == PotionEffect.class) {
} else if (param == PotionEffectType.class) {
try {
PotionEffectType potionType = PotionEffectType.getByName(valueString.toUpperCase());
if (potionType == null && isNumeric(valueString)) {
potionType = PotionEffectType.getById(Integer.parseInt(valueString));
}
value = new PotionEffect(potionType, 0, 0);
if (potionType == null)
throw new Exception();
value = potionType;
} catch (Exception ex) {
throw parseToException("potioneffect type", valueString, methodName);
}

View File

@ -104,6 +104,8 @@ public class DisguiseHelpCommand extends BaseDisguiseCommand {
valueType = "Ocelot type";
} else if (Profession.class == c) {
valueType = "Villager Profession";
} else if (PotionEffectType.class == c) {
valueType = "Potioneffect Type";
}
if (valueType != null) {
methods.add(ChatColor.RED + method.getName() + ChatColor.DARK_RED + "(" + ChatColor.GREEN