String type = m.group(2).toLowerCase();
// Set the name/id/location of the inventory holder
String holder = m.group(3);
if (type.equals("generic")) {
Argument arg = Argument.valueOf(holder);
if (arg.matchesEnum(InventoryType.values())) {
return new dInventory(InventoryType.valueOf(holder.toUpperCase()));
}
else if (arg.matchesPrimitive(PrimitiveType.Integer)) {
return new dInventory(arg.asElement().asInt());
}
else {
dB.echoError("That type of inventory does not exist!");
}
}