I can't solve the problem: the console shows the same thing. The point is to send information about the player to another class method when receiving a command. method "Loads" placed in one class, meanwhile "do some work" in main class. Here is main: I don't know what to do anymore, I've been sitting on the error for more than two hours. thanks everyone for the help.