Its me again -- Having issies with Vector3f, how can i retrive it from a command?

  • I'm Trying to have vector3f save the coords to memory, then retrive it From a command
    Ive tried attributes but that resulted in errors, id post the console here, but its not writing any errors into the debug console.
    it writes fine, i can get it from the same event, but i want to get the vector3f from the other event.

  • What error did you get exactly? Maybe post your code here.


    Storing the Vector as attribute is actually the right way (or more precisely, the most convenient way) to store data. Make sure to use a unique attribute key name to avoid collisions with other plugins, e.g. use your package name or something like this (for example "testplugin.captaincornball.playerdata.vector"). When retrieving the data, you have to cast it to a Vector3f (since the "getAttribute()" function returns an "Object"). Example:

  • I don't know why it won;t write any Error logs or anything, It won't write to the debug console, i checked the logs, nothing.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!