I'm currently programming a Minecraft plugin.
Now I would like to activate a listener with the help of a command.
I imagined the whole thing like this:
I enter the command in Minecraft
an If query in the Command (is a public boolean) class sets a boolean to either true or false, depending on what is entered.
this boolean is now passed into the listener (is a public void) class
there's an if-query that tests whether the boolean is true or false
if true, the listener code will be executed
My problem is that I do not get it to get the boolean in the other class or call him from the other class.
I hope I have expressed myself clearly to some extent.
Read here