Advertisement
EntenPlayz

Untitled

Jul 15th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. public static Location getCom(Player p)
  2. {
  3. File file = new File("plugins//LobbySystem//Navigator.yml");
  4. Location loc = p.getLocation();
  5.  
  6. YamlConfiguration cfg = YamlConfiguration.loadConfiguration(file);
  7.  
  8. loc.setX(cfg.getDouble("Com.X"));
  9. loc.setY(cfg.getDouble("Com.Y"));
  10. loc.setZ(cfg.getDouble("Com.Z"));
  11. loc.setYaw((float)cfg.getDouble("Com.Yaw"));
  12. loc.setPitch((float)cfg.getDouble("Com.Pitch"));
  13. loc.setWorld(Bukkit.getWorld(cfg.getString("Com.World")));
  14.  
  15. return loc;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement