The client is offline due to RuneScape update. You may see instance errors but this is due to the update and not actual instance errors. This should be resolved soon. Join our Discord for more information.

LoginResponseListener



  • I am trying to listen for a login response (to handle bans and locks) but the notify() function is not called when the client logs in

    My current code is

    @ScriptMeta(developer = "Bobbey", desc = "Testing ", name = "Test script")
    public class TestScript extends Script  implements LoginResponseListener {
    
    	@Override
    	public void notify(LoginResponseEvent event) {
    		System.out.println("This is not called");
    	}
    
    //other stuff...
    }
    


  • I just tried it and it seemingly worked for me:

    @Override
        public void notify(LoginResponseEvent event) {
            Log.log(Level.ALL, "Debug", event.getResponse().getMessage());
        }
    

    download.png



  • Ah right. This event is not called when you log in properly


  • Contributor Sponsor Staff Director

    @Bobbey Yes, the game doesn't send a "response event" for a successful login. This is only if a message is needed to be displayed on the login screen, such as "your account has been disabled"


 

27
Online

17.5k
Users

1.5k
Topics

19.6k
Posts