use of logisticspipes.commands.exception.MissingArgumentException in project LogisticsPipes by RS485.
the class NameLookupCommand method executeCommand.
@Override
public void executeCommand(ICommandSender sender, String[] args) {
if (args.length < 2) {
throw new MissingArgumentException();
}
String idString = args[0];
String metaString = args[1];
int id = Integer.valueOf(idString);
int meta = Integer.valueOf(metaString);
ItemIdentifier item = ItemIdentifier.get(Item.getItemById(id), meta, null);
sender.addChatMessage(new ChatComponentText("Name: " + item.getFriendlyNameCC()));
}
Aggregations