Reading x + y + z cords out of a .conf File

Discussion in 'Plugin Development' started by Glasfaser, Aug 13, 2016.

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

    Glasfaser

    Hey,
    i'm writing an Plugin, that should save the cordiantes, who you can set them via /setspawn, if you type /spawn you ll get teleported to theeese cordinates. That Cordinates should saved into an file.


    Here's my code:
    http://pastebin.com/4hc3brL2
     
  2. Offline

    N00BHUN73R

    @Glasfaser
    You'd use
    getConfig().getDouble(String node) I think it is and save it to a double/location

    EDIT: I didn't look at the pastebin first.. lol
    What's not working?
    Are you calling config.save() after writing the values, are they even there?
     
  3. Offline

    BizarrePlatinum

    @Glasfaser Can I see your config? It looks like your paths are likely wrong.
     
  4. Offline

    Glasfaser

    nah the the command /spawn take me to X:0 Y:0 Z:0

    http://pastebin.com/2zvAjSsz

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Aug 13, 2016
  5. The path shouldn't contain ":"

    Change it to
    Code:
    "spawnx"
    and for y, z the same.
     
    N00BHUN73R likes this.
Thread Status:
Not open for further replies.

Share This Page