Solved Plugin help

Discussion in 'Plugin Development' started by aaron1998ish, Mar 29, 2015.

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

    aaron1998ish

    Hey im having trouble with the onJoin teleport feature im messing with:

    Basically what im trying to do at the moment is if someone first joins a new map is created, then they're sent to that map created on their next login..

    The code works, files are generated and players are teleported on next login, but the teleport is not following the config coordinates?

    Its probably going to be an easy fix but i just cant see where ive gone wrong :/

    Code:
    //Solved//
     
    Last edited: Mar 30, 2015
  2. Offline

    TGRHavoc

    You're setting the co-ordinates to a string in the config file ("set(event.getPlayer().getName() + ".spawnPointX", "1");") meaning that when you do getDouble(String) you're receiving the default values for a double (0).
    Remove the quotation marks from the lines of code that set the "spawnPoint" variables in the config.
     
  3. Offline

    WladHD

    Case sensitive... "spawnPointX" is not equals to "spawnPointx".
    And dont set them to a string...
     
  4. Offline

    aaron1998ish

    Thanks guys, its all working now, and the caps issue was fixed a few seconds after posting, but the main issue was the string
     
Thread Status:
Not open for further replies.

Share This Page