Problem creating worlds

Discussion in 'Plugin Development' started by bernivic135, Feb 19, 2016.

Thread Status:
Not open for further replies.
  1. Offline

    bernivic135

    Hi, I don't know how to create words inside bukkit coding. If anyone can help, thanks.
     
  2. Offline

    Skylandz

    um, the title says "worlds" but the post says "words". which one should it be?
     
  3. Offline

    Zombie_Striker

  4. Offline

    bernivic135

    Well, sorry for the typing mistakes. I refered the first one. Ok, so I tried this code in onEnable and It didn't worked. It gives me no errror in console.
    Code:
    if(Bukkit.getWorld("lobby").equals(null)) {
    
                WorldCreator wc = new WorldCreator("lobby");
                wc.environment(World.Environment.NORMAL);
                wc.createWorld();
    
            }
    Also in Plugin.yml I have load: startup. is it correct?
     
  5. Offline

    nuno1212sss

    @bernivic135 that .equals(null) though... if you try to execute a method on a null class it will backfire, do == null instead.

    And if there were no errors, the world probably exists already (because if it didn't you would have gotten a NullPointerException)
     
  6. Offline

    bernivic135

    Okay, thanks. It now works.
     
Thread Status:
Not open for further replies.

Share This Page