Change potioneffect to potioneffecttype. Fix not having it in displayed opens.
This commit is contained in:
parent
7a9dd70990
commit
f6113cb774
@ -235,13 +235,15 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parse to potion effect
|
// Parse to potion effect
|
||||||
} else if (param == PotionEffect.class) {
|
} else if (param == PotionEffectType.class) {
|
||||||
try {
|
try {
|
||||||
PotionEffectType potionType = PotionEffectType.getByName(valueString.toUpperCase());
|
PotionEffectType potionType = PotionEffectType.getByName(valueString.toUpperCase());
|
||||||
if (potionType == null && isNumeric(valueString)) {
|
if (potionType == null && isNumeric(valueString)) {
|
||||||
potionType = PotionEffectType.getById(Integer.parseInt(valueString));
|
potionType = PotionEffectType.getById(Integer.parseInt(valueString));
|
||||||
}
|
}
|
||||||
value = new PotionEffect(potionType, 0, 0);
|
if (potionType == null)
|
||||||
|
throw new Exception();
|
||||||
|
value = potionType;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw parseToException("potioneffect type", valueString, methodName);
|
throw parseToException("potioneffect type", valueString, methodName);
|
||||||
}
|
}
|
||||||
|
@ -104,6 +104,8 @@ public class DisguiseHelpCommand extends BaseDisguiseCommand {
|
|||||||
valueType = "Ocelot type";
|
valueType = "Ocelot type";
|
||||||
} else if (Profession.class == c) {
|
} else if (Profession.class == c) {
|
||||||
valueType = "Villager Profession";
|
valueType = "Villager Profession";
|
||||||
|
} else if (PotionEffectType.class == c) {
|
||||||
|
valueType = "Potioneffect Type";
|
||||||
}
|
}
|
||||||
if (valueType != null) {
|
if (valueType != null) {
|
||||||
methods.add(ChatColor.RED + method.getName() + ChatColor.DARK_RED + "(" + ChatColor.GREEN
|
methods.add(ChatColor.RED + method.getName() + ChatColor.DARK_RED + "(" + ChatColor.GREEN
|
||||||
|
Loading…
Reference in New Issue
Block a user