2

I have a Paper-Server (1.16.4) with MultiversePlugin (and some other plugins, like EssentialsX) and multiple worlds.
Is there a command which can teleport all players of a specific world into another world?

something like (only example!):/teleport @allPlayers:World2 to world:World3

1

I think it should be possible using the /execute command.

/execute in <toDimension> run tp @a[nbt={Dimension:"<fromDimension>"}] <location>
9
  • That command does not really work. <fromDimension> must be a Dimension (like overworld,nether,..) whereas <toDimension> can point to a world. This worked partially: execute in overworld run execute in newspawn run tp @a 0 64 0 but it has same effect as execute in newspawn run tp @a 0 64 0 The problem is, ALL players from all worlds are teleported to the new world (newspawn).
    – Ben
    Dec 27 '20 at 0:42
  • I could have tought of that @a realy means all and not all in the current dimension, anyways I will try to find another way, if I can't I will delete this "answer" Dec 27 '20 at 2:02
  • @Ben Updated the answer. The player has a Dimension nbt tag which can be used to select players in a specific dimension. Dec 27 '20 at 2:13
  • @NoelNemeth Does the Dimension NBT tag work with players in other multiverse worlds with the Multiverse plugin? Dec 27 '20 at 2:15
  • @ExpertCoder14 Honestly, I didn't tested it, but I think it must register the world somewhere and it would be the most logical way to follow the "standard". Dec 27 '20 at 2:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.