Validate method parameters when registering events. Fixes BUKKIT-3779