The snapshot version contains a release date, so we'll simply compare
that against a known release date of a Minecraft version. It it's
later, we know it is at least a minor version above, and vice versa.
The two commands added are as follows:
protocol:
Reload the configuration, check for updates and download the
most recent version.
packet:
Add or remove a simple packet inspector. Can even display the
content of each packet.
This is achieved by injecting the NetLoginHandler when it's added
to the DedicatedServerConnectionThread's list of current login handlers.
PacketEvents during this phase uses "fake" Player objects that only
support a subset of methods. Consumers can expect the following methods
to be functional:
* getPlayer()
* getAddress()
* getServer()
* chat(String)
* sendMessage(String)
* sendMessage(String[])
* kickPlayer(String)
A "fake" Player object can be converted to its real counterpart by
calling getPlayer().
While it may seem better to use a Spout PacketListener, we can't
prevent other spout listeners from stopping the listener
chain. For instance, Orebfuscator does supports Spout, but does this
by cancelling every chunk packet and sending them to be processed and
sent by Orebfuscator only. This can never be made compatible with
other plugins.
So, we choose to add some overhead and inject our proxy onto Spout.
Fortunately, Spout injects the proxy using a player listener on LOWEST,
so we get to override Spout again with our HIGHEST. The proxy method
should be generic enough to handle most proxy types.