Explanation of the problem.
I am using a library that is essentially a web server. This web server has a user login manager class and in that class there is a onUserLogin(User user)
method that is triggered every time a user is logged in. I do not have access to the source code and I don't want to change it even if I had.
I want to know if it is possible to somehow register an event that is triggered every time this method is called and get the argument that it was called with on my code.
For more context, my code is a library that this webserver will use in return but the only thing that the webserver is blindly registering all plugins from a single entry point without offering any other API.