As the copyright owner you can do whatever you want. You can make your code gpl and give (written) permission to only blizzard to use the code under a different license.
You’d need a CLA for potential contributors though and I have no idea what courts think about it (not a lawyer, not legal advice).
Did we finally find the guy who unironically thinks APIs should be copyrightable?