Solved Minigame help!

Discussion in 'Plugin Help/Development/Requests' started by kaif21, May 2, 2015.

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

    kaif21

    Ok so hi
    Im using a Minigame resource and
    http://bukkit.org/threads/tut-create-a-minigame-with-arena-names.193908/
    This one and I have some problems
    1.It will reset arena on reload
    2.First eveything worked except arena reseting but not nothing works
    i changed some code
    Code:java
    1.  
    2. public void loadArenas() {
    3. Bukkit.broadcastMessage("Loading Arenas");
    4. //I just create a quick Config Variable, obviously don't do this.
    5. //Use your own config file
    6. FileConfiguration fc = Lol.plugin.getConfig(); //If you just use this code, it will erorr, its null. Read the notes above, USE YOUR OWN CONFIGURATION FILE
    7.  
    8. //Youll get an error here, FOR THE LOVE OF GAWD READ THE NOTES ABOVE!!!
    9. for (String keys: fc.getConfigurationSection("arenas").getKeys(false)) { //For each arena name in the arena file
    10.  
    11. //Now lets get all of the values, and make an Arena object for each:
    12. //Just to help me remember: Arena myArena = new Arena("My Arena", joinLocation, startLocation, endLocation, 17)
    13.  
    14. World world = Bukkit.getWorld("arenas." + keys + ".world");
    15.  
    16. //Arena's name is keys
    17.  
    18. double joinX = fc.getDouble("arenas." + keys + "." + "joinX");
    19. double joinY = fc.getDouble("arenas." + keys + "." + "joinY");
    20. double joinZ = fc.getDouble("arenas." + keys +"." + "joinZ");
    21. Location joinLocation = new Location(world, joinX, joinY, joinZ);
    22.  
    23. double startX = fc.getDouble("arenas." + keys +"." + "startX");
    24. double startY = fc.getDouble("arenas." + keys +"." + "startY");
    25. double startZ = fc.getDouble("arenas." + keys +"." + "startZ");
    26.  
    27. Location startLocation = new Location(world, startX, startY, startZ);
    28.  
    29. double endX = fc.getDouble("arenas." + keys +"." + "endX");
    30. double endY = fc.getDouble("arenas." + keys +"." + "endX");
    31. double endZ = fc.getDouble("arenas." + keys +"." + "endX");
    32.  
    33. Location endLocation = new Location(world, endX, endY, endZ);
    34.  
    35. int maxPlayers = fc.getInt("arenas." + keys +"." + ".maxPlayers");
    36.  
    37. //Now lets create an object to represent it:
    38. Arena arena = new Arena(keys, joinLocation, startLocation, endLocation, 17);
    39. Bukkit.broadcastMessage("Success");
    40.  

    SO please help ive working on this for 2 days now

    My whole console log after running my join cmd
    http://pastebin.com/xM5H92Gz
    @timtower
    can u help and fix my post into one ty
    error on creating new arena
    http://pastebin.com/W85aUYHq

    i solved it on my own i pm'd staff they wont help :p

    <Edit by mrCookieSlime: Merged posts. Please don't triple post. There is an Edit Button right next to the Date.>
     
    Last edited by a moderator: May 2, 2015
  2. Offline

    mine-care

    i find it impossible for a staff member of this comunity not helping they are really helpful, anyway it is better to keep the discussion going on here for future reference.

    So Although this is solved, Please post what the problem was and how you solved it.
     
  3. Offline

    mrCookieSlime

    Moved to Alternatives Section.
     
Thread Status:
Not open for further replies.

Share This Page