Maybe error in bukkit ?

Discussion in 'Plugin Development' started by Welite, Jan 21, 2014.

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

    Welite

    Hi I am trying to get a World from a string in a configuration file, everything works fine, but when I try to get a world it said that :Name cannot be null, I am getting it like this, I believe that is error in bukkit.


    Code:java
    1. configFile2 = new File(pluginFolder, "arenas.yml");
    2. arenas = new YamlConfiguration();
    3. if(!pluginFolder.exists()){
    4. try{
    5. pluginFolder.mkdir();
    6. }catch(Exception ex){
    7. }
    8.  
    9.  
    10.  
    11. World world = Bukkit.getWorld(arenas.getString(getArena(p) + ".exit.exit.world")); //returns null
    12.  
    13. arenas.getString(getArena(p) + ".exit.exit.world"); //also returns null
    14.  
    15.  
    16.  
    17. getArena(p); //returns the name of arena in which is player joined




    file arenas.yml:
    Code:
    Arena: 
      exit:
        exit:
          x: 2.9751548445806115
          y: 68.0
          z: 5.330786024127412
          yaw: 13.127258
          pitch: 28.049786
          world: Azeroth
     
  2. Offline

    Bloxcraft

    What does getArena(p) do? Could you post that code?
     
  3. Offline

    Welite

    Sorry it was my stupid mistake.
     
Thread Status:
Not open for further replies.

Share This Page