Resolves FS-338

This commit is contained in:
Video 2022-11-13 06:40:36 -07:00 committed by Paul Reilly
parent eadbc504e5
commit 20f341ea45

View File

@ -251,21 +251,18 @@ public class Command_enchant extends FreedomCommand
return getEnchantments(item); return getEnchantments(item);
} }
} }
else if (args.length == 3) else if (args.length == 3 && args[0].equals("add"))
{ {
if (args[0].equals("add")) Enchantment enchantment = Enchantment.getByName(args[1].toUpperCase());
if (enchantment != null)
{ {
Enchantment enchantment = Enchantment.getByName(args[1].toUpperCase()); if (!unsafe)
if (enchantment != null)
{ {
if (!unsafe) return stringNumberRange(1, enchantment.getMaxLevel());
{ }
return stringNumberRange(1, enchantment.getMaxLevel()); else
} {
else return Collections.singletonList("[level]");
{
return Collections.singletonList("[level]");
}
} }
} }
} }