1.15.2 End createWorld() bug, or me?

Discussion in 'Spigot Plugin Development' started by redbau, May 13, 2020.

  1. I cannot get 1.15.2 to successfully create an end world that works without a reboot, even the most basic version throws a null error:

    This works fine to create a working overworld: :cool:
    Code (Text):
    Bukkit.createWorld(new WorldCreator("worldname"));
    And this throws a null error for createWorld() line 3: :mad:
    Code (Text):

    WorldCreator worldCreator = new WorldCreator("worldname_the_end");
    worldCreator.environment(World.Environment.THE_END);
    Bukkit.createWorld(worldCreator);
     
    After this error, I try to join the world and it fails: "invalid world"

    But reboot the server and the end world works totally fine! o_O

    What gives? I'm very confused here, not sure if this is perhaps a bug I've run up against or just something I'm doing wrong with a lack of options that don't appear to be required but are indeed.
     
  2. Try loading the world manually after creating it with Bukkit#getServer()#getWorlds()#add(world)
     
  3. Pretty sure the List returned by this method is a copy of the actual List stored by the server, hence this will do nothing.
     
  4. Might work,EntityDeathEvent.getDrops returns a list as well but still drops the item added through .add
     
  5. That didn't work either, still "invalid world" but on reboot it's fine.

    Code (Text):
    WorldCreator worldCreator = new WorldCreator(worldName);
    worldCreator.environment(World.Environment.THE_END);
    World c = Bukkit.createWorld(worldCreator);
    Bukkit.getServer().getWorlds().add(c);
     
  6. How are you trying to acces the world? Might give us some extra insight on why it's not working for you.
     
  7. After creation, I'm trying to access the world 3 ways:
    - Essentials /warp end, to a point that works fine after reboot
    - Essentials /home, to a point that works fine after reboot
    - Using an end portal, which has no error but fails to teleport me,
     
  8. Try manually teleporting players to your new dimension with your own plugin. Not sure how essentials handles the creation of new worlds from other plugins.
     
  9. I understand what you mean but the basic portal should work and it's not.