public void fromString(String str) throws CommandException {
Type type = Type.findByPattern(str);
if (type != null) {
this.type = type;
} else {
throw new CommandException("Acceptable types: projectiles, items, paintings, itemframes, boats, minecarts, tnt, xp, or all");
}
}