Solved ignore that.. was a typo in code

Discussion in 'Plugin Development' started by recon88, Nov 26, 2012.

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

    recon88

    Ignore that.. Had a typo in my code.
     
  2. Offline

    NoLiver92

    Code:
        public Location getLocation(String player){
        String world = conf.getString("Locs" + "." + player + "." + "X");
        double x = conf.getDouble("Locs" + "." + player + "." + "X");
        double y = conf.getDouble("Locs" + "." + player + "." + "Y");
        double z = conf.getDouble("Locs" + "." + player + "." + "Z");
        Float yaw = (float) conf.getDouble("Locs" + "." + player + "." + "Yaw");
        Float pitch = (float) conf.getDouble("Locs" + "." + player + "." + "Pitch");
        Location loc = new Location(Bukkit.getWorld(world), x, y, z, yaw, pitch);
        return loc;
        }
    line 2 of your code looks at the x coordinate rather then the world change the X to World and it should work
     
  3. Offline

    recon88

    Yea I already saw it. Anyways thanks.
     
Thread Status:
Not open for further replies.

Share This Page