Transform<World> help

So I’m working with the RespawnPlayerEvent and I want to change player respawn location, I see setToTransform(Transform) but I don’t know what Transform is or if it is possible to obtain it from the World object. Some wisdom is needed please.

The Transform class is concrete in the API so you can create a new one by simply doing
Transform<World> t = new Transform<>(world, position);

You can also create a new transform based off of another one, e.g. to create a new transform with a different position you can do Transform<World> t = getFromTransform().setPosition(new Vector3d(1, 2, 3))

The transform class itself simply stores an extent, position and rotation.

1 Like

Boy i hate it when my head tries to make things more complicated than they actually are. So simple, Thanks.

2 Likes