Me and @ReportCards made a plugin called "DupeCore", On it you can dupe items with /dupe and get random items, the idea of it is to save time skripting it, the plugin is also highly configurable so you can change a lot of things about it.
https://www.spigotmc.org/resources/dupecore.89129/