How can I set a variable in a secondary class in my plugin and call it in another secondary class?

Co
- in Plugins
4

I'm currently programming a tracker plug-in for Minecraft. For this I want to put the CompassTraget on the player who gives a command. The command is in a different class than the part where I want to set the CompassTraget. Does anyone have an idea how I can do that?

Dr

You might want to take a look at Java Basics.

You can execute the method with a reference to the other class or the object.
But I can't say any more details either because I don't know your code.
You just left that out. For a programming question!

No

For me this is more like a "I'm programming a Minecraft plugin but can't do the basics of Java" problem.

Dr

Yes, very typical.

And apparently such a complete beginner that you haven't learned to google yet?
Is actually already the basis for it.

No

I keep saying "Forget Minecraft / blabla games and learn the basics first", but somehow it never works here.

Then there's no more help. "Learn the basics" is the best possible help. But that's what you've already advised.