Skip to content
New issue

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

Player.setSpawnPostion() ignores world component #204

Open
toddharrison opened this issue Mar 6, 2015 · 3 comments
Open

Player.setSpawnPostion() ignores world component #204

toddharrison opened this issue Mar 6, 2015 · 3 comments

Comments

@toddharrison
Copy link

When I call player.setSpawnPosition(newSpawn); it accepts the new coordinates, but does not change the world from default. Thus when I eventually respawn (say after being killed) I get teleported to the newSpawn coordinates, but in the default world instead of the newSpawn world.

@darkdiplomat
Copy link
Member

This is actual expected behavior as there is no reference to world when storing the coordinates for spawning.

@toddharrison
Copy link
Author

Perhaps that's the case when the spawn position is initially being set, but I'm trying to set it to a different value later on when the world references are available using the set method. This would correspond to setting the bed location, right? After I do that I appear in the wrong world but the right coordinates. That would apply to bed spawning as well, wouldn't it?

@darkdiplomat
Copy link
Member

Internally, there is just a position recorded in the nbt of a player, which is why the world wasnt really stored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants