Validate method parameters when registering events. Fixes BUKKIT-3779
Merge remote-tracking branch 'Bukkit/master'