Added call to LightningStrikeEvent.
Handle target blocks gracefully (fixes #172).

Sometimes, player.getTargetBlock() throws an IllegalStateException. This
is usually the case if players stand at height 127 and look up when
left-clicking. The exception can be safely caught and treated as an
invalid block (air in this case).
Added block placement handling for buttons (see #119).

Moved setAttachable() for Buttons and Levers to BlockAttachable.
Added block placement handling for beds (see #119).

Handling of breaking beds not yet implemented.
Implement container blocks dropping their contents.

Fixes containers losing their contents and dropping incorrect blocks when
broken.
Handle status packets asynchronously.
Updated remapper (fixes #268).
Prevent clients logging in multiple times (fixes #150).

Also adds (Async)PlayerPreLoginEvent support.
Provide hostname in PlayerLoginEvent.
Implemented AsyncPlayerChatEvent (fixes #103).
Tidied up EventFactory and its uses.
Made some utility classes final.
Revamped place and dig event handling.

Throw BlockBreakEvents in creative (fixes #273).
Fix BlockPlaceEvents returning AIR (fixes #271).
Prevent block break with swords in creative (fixes #214).
Simplified dig and place logic slightly.
Added basic potion effect definitions (fixes #295).
Added checkstyle and fixed code to obey it (thanks @meggawatts).
Added more command-line parameters.
Added command line parameters for jline.

Signed-off-by: William Lebel <lebelwilliam@gmail.com>
Handle invalid command line parameters with a warning only.

This commit changes the server startup code so that it starts even when
encountering an unknown option. This change is motivated by the fact that most
server hosts provide the nogui option in their startup script and would thus
prevent the server from starting.
Further tidied up command line handling.