Help why my pitch = 0

Discussion in 'Spigot Plugin Help' started by brdeadmaster, May 22, 2017.

  1. Hi ,My name is brown.
    I'm Asians.
    I have problem with my code

    I can set pitch in config files but when i get pitch it = 0


    [​IMG][/url][/IMG]
    here my code

    Code (Text):
    if(cmd.getName().equalsIgnoreCase("home")){
               
                float yaw = (float) getConfig().getDouble(player.getName() + ".yaw");
                float pitch = (float) getConfig().getDouble(player.getName() + ".pitch");
               
               
               
                Location loc = new Location(Bukkit.getWorld(getConfig().getString(player.getName() + ".world")),
                        getConfig().getDouble(player.getName() + ".x"), getConfig().getDouble(player.getName() + ".y"),
                        getConfig().getDouble(player.getName() + ".z"));
               
                loc.setYaw(yaw);
                loc.setPitch(pitch);

               
                player.sendMessage("Yaw is : " + yaw);
                player.sendMessage("pitch is : " + pitch);
               
                player.teleport(loc);
               
                return true;
            }
    and my config.yml
    Code (Text):
    brdeadmaster:
      uuid: 147591a0-a2e5-49ac-a763-dd9fdebbbcaa
      x: 1590.4061622912993
      y: 72.0
      z: -144.46694131406161
      picth: 33.45001
      yaw: 91.350204
      world: world
     
     
  2. sorry my image don't work :(
    here my image
     

    Attached Files:

  3. You are setting the value is 'picht' and trying to get 'pitch'

    Tapatalkkal küldve az én LG-K120 eszközömről
     
  4. thx... oh god that my fault
     
  5. Common mistake, don't worry

    Tapatalkkal küldve az én LG-K120 eszközömről