Developers: How to add a license check to your plugin
You do not have to do anything code-wise to add a license check to your premium plugin. It's all automatic, unlike with premium templates.
How it works
All you have to do is submit your plugin to the addons website and give it a price (thereby making it a "premium" plugin). When a user tries to install a plugin, Pro Edition's plugin manager will ping the addons site, check whether the plugin it's about to install is a "premium" plugin (has a price), and if it is it will check to make sure a license exists for it on the domain name it's coming from.
Use test licenses for your own plugins
The license check doesn't happen unless you've submitted your plugin to the addons website. So until you do that you don't have to worry about getting a "not licensed" error when trying to install your own plugin (i.e. during initial development). After you have submitted your plugin to the Addons website you can use it on your own sites by issuing test licenses. You can manage your test licenses by logging-in to the Addons website, going to "My Addons", then looking under "Developer Tools" and clicking "Manage Test Licenses".