Advertisement
Simagdo

Load Spawn

Feb 8th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. Location redSpawn;
  2. Location blueSpawn;
  3.  
  4. public void loadRedSpawn(Player player) {
  5. String world = cfg.getString("DTF.RedSpawn.world");
  6. double x = cfg.getDouble("DTF.RedSpawn.x");
  7. double y = cfg.getDouble("DTF.RedSpawn.y");
  8. double z = cfg.getDouble("DTF.RedSpawn.z");
  9.  
  10. World w = Bukkit.getWorld(world);
  11. redSpawn = new Location(w, x, y, z);
  12.  
  13. player.teleport(redSpawn);
  14. }
  15.  
  16. public void loadBlueSpawn(Player player) {
  17. String world = cfg.getString("DTF.BlueSpawn.world");
  18. double x = cfg.getDouble("DTF.BlueSpawn.x");
  19. double y = cfg.getDouble("DTF.BlueSpawn.y");
  20. double z = cfg.getDouble("DTF.BlueSpawn.z");
  21.  
  22. World w = Bukkit.getWorld(world);
  23. blueSpawn = new Location(w, x, y, z);
  24.  
  25. player.teleport(blueSpawn);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement