My teleport to newly created world plugin is not working?

Discussion in 'Plugin Development' started by bobthetreegod, Aug 29, 2019.

  1. Offline

    bobthetreegod

    Im working on a plugin where when an op enters the command /game start it creates a new world and teleports all the player to said world. However that only happens once when the server first starts up and you enter the command for the first time. Anytime you use the command again, it just tps to the same world instead of creating a new one. I dont know why please help

    this is the command class https://pastebin.com/XTthjVR2

    this is main https://pastebin.com/bRHL2kEM
     
  2. Offline

    CraftCreeper6

    @bobthetreegod
    The world will always have the same name, if the world has already been created, you cannot create it again. You have to delete it first, or give it a different name.
     
  3. Offline

    robertlit

    @bobthetreegod exactly as said above, let me explain it a bit more, when you tell the plugin to create a world, it'll first check if it already exists, if it does it won't over write it, it'll just load it. (this has nothing to do with your question but it will give you some information for future use: loading a world makes it a part of the server, if the world isn't loaded it isn't part of the server)
     

Share This Page