@Override
public void handleServer(ServerSession session, PlayerStatusMessage message) {
final Server server = session.getEngine();
if (message.getStatus() == PlayerStatusMessage.INITIAL_SPAWN) {
server.getEventManager().callEvent(new PlayerConnectEvent(session, (String) session.getDataMap().get("username"), 10));
if (server.debugMode()) {
server.getLogger().info("Login took " + (System.currentTimeMillis() - session.getDataMap().get(VanillaProtocol.LOGIN_TIME)) + " ms");
}
final ManagedMap data = session.getPlayer().getWorld().getData();
final Human human = session.getPlayer().add(Human.class);