package com.mithrilclient.module;

import com.mithrilclient.config.ConfigManager;
import com.mithrilclient.reflection.ReflectionHooks;

public final class LoginDetailsModule extends Module {
	@Override
	public void init() {
		String username = ConfigManager.CONFIG.getDefaultUsername();

		if (username == null) return;
		if (username.isEmpty()) return;

		ReflectionHooks.setUsername(username);
		ReflectionHooks.setLoginState(2);
		ReflectionHooks.setLoginCursorField(1);
		ReflectionHooks.setLoginMessage("Enter your username/email & password.");
	}
}

@@ -184,16 +184,235 @@
 odule %7B%0A
+%09private int lastLoginState = 0;%0A%0A%09@Override%0A%09public void tick() %7B%0A%09%09int loginState = ReflectionHooks.getLoginState();%0A%0A%09%09if (loginState == 2 && lastLoginState == 0) %7B%0A%09%09%09init();%0A%09%09%7D%0A%0A%09%09lastLoginState = loginState;%0A%09%7D%0A%0A
 %09@Overri

Add login detail filling after previous logout.