We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[15:36:38][ERROR][err] Caused by: java.lang.ClassCastException: [Ljava.lang.Obje ct; cannot be cast to [Lnet.gtaun.shoebill.data.Vector3D;
This error occurs everytime I try to cast an ArrayList to a Vector3D[] array after adding a Location (player.getLocation()); to the ArrayList
example:
ArrayList<Vector3D> controlPoints = new ArrayList<>(); controlPoints.add((Vector3D) player.getLocation());
and then
Vector3D[] tmp = (Vector3D[]) controlPoints.toArray();
The text was updated successfully, but these errors were encountered:
I solved it with this code
Vector3D[] tmp = new Vector3D[controlPoints.size()]; for (int i = 0; i < tmp.length; i++) { tmp[i] = controlPoints.get(i); }
or
Vector3D[] tmp = new Vector3D[arrayList.size()]; tmp = arrayList.toArray(tmp);
So something is in trouble with the kotlin changes...
Sorry, something went wrong.
No branches or pull requests
[15:36:38][ERROR][err] Caused by: java.lang.ClassCastException: [Ljava.lang.Obje
ct; cannot be cast to [Lnet.gtaun.shoebill.data.Vector3D;
This error occurs everytime I try to cast an ArrayList to a Vector3D[] array after adding a Location (player.getLocation()); to the ArrayList
example:
and then
The text was updated successfully, but these errors were encountered: