When a button is clicked,a boolean will be set to true and that will mean that every class will call a different method then what they would call if the boolean was set to falese.
OK, you have two possible locations:
the first is in the world class; it can be non-static with 'get' and 'set' methods or it can be static;
the other is in the button class where is would need to be static (unless you only create one button, in which case it could be non-static with 'get' and 'set' methods;
For ease of coding, a 'public static boolean' in the world class may be the way to go. Then you can access and change the value from any class by using 'WorldClassName.fieldName' to refer to the field.