Help with weapon restrictions

So in my rmmv game I’m using elemental based weapons that grant you skill types and skills as long as you have them equipped (e.g. a beginners fire staff will grant you the skill type “Fire magic” and the Fire magic skill “Fireball”)

However I also want dual wielding for some classes to be a thing and that these classes are not allowed to wear weapons of the same elemental origin at the same time.
So if the character is wielding a fire sword in his mainhand he shouldn’t be allowed to wield another fire sword in his offhand, but he could wield a fire and an ice sword for example and get both skill types this way.
In addition to this the weapons should not be restricted to main- or offhand, you should be allowed to swap them around as you like.
I already built some weapon types, tested around and did some research but couldn’t find any fitting solution.

Is there an easy way to achieve this that I may have overseen? Thanks in advance!
You can probably use Yanfly’s weapon requirements to do this but you’ll likely need someone to help you with the java script code to do it. You might take a look at Yanfly’s other plugins as well. There might be one that will let you do it easier.

Original thread: https://forums.rpgmakerweb.com/threads/help-with-weapon-restrictions.126929/