Advertisement
RedixPvP

Lobby

Apr 28th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. if (cmd.getName().equalsIgnoreCase("lobby")) {
  2. if (args.length == 0) {
  3. String str = "primepvp.lobby.";
  4. try {
  5. World w = Bukkit.getWorld(cfg.getString(str + "world"));
  6. if (w == null) {
  7. p.sendMessage("§cUnknown World!");
  8. return true;
  9. }
  10. double x = cfg.getDouble(str + "x");
  11. double y = cfg.getDouble(str + "y");
  12. double z = cfg.getDouble(str + "z");
  13. double yaw = cfg.getDouble(str + "yaw");
  14. double pitch = cfg.getDouble(str + "pitch");
  15. Location loc = new Location(w, x, y, z, (float)yaw, (float)pitch);
  16. p.teleport(loc);
  17. p.sendMessage(main.pr+"§eDu befindest dich nun in der Lobby.");
  18. } catch (Exception e) {
  19. p.sendMessage(main.pr+"§eSetze zuerst den Lobbypunkt!");
  20. }
  21. } else {
  22. p.sendMessage("§c/lobby");
  23. }
  24. }
  25. return true;
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement