Use Command when registering a command in plugin

API is still compatible.