Guest User

Untitled

a guest
Apr 1st, 2014
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. if (args[0].equalsIgnoreCase("bazagil")) {
  2. if (claned(p))
  3. {
  4. if (getConfig().getString("Klany." + getClan(p) + ".Base.World") != null)
  5. {
  6. if (!this.zaproszenia.containsKey(p))
  7. {
  8. this.teleporty.put(p, Boolean.valueOf(true));
  9. final Plugin plugin = this;
  10. p.sendMessage(this.prefix + "Teleportacja... Nie ruszaj sie !.");
  11. this.taskId = getServer().getScheduler().runTaskLater(this, new Runnable(){
  12. public void run()
  13. {
  14. if (Main.this.zaproszenia.containsKey(p))
  15. {
  16. double x = plugin.getConfig().getDouble("Klany." + Main.this.getClan(p) + ".Base.X");
  17. double y = plugin.getConfig().getDouble("Klany." + Main.this.getClan(p) + ".Base.Y");
  18. double z = plugin.getConfig().getDouble("Klany." + Main.this.getClan(p) + ".Base.Z");
  19. float yaw = plugin.getConfig().getInt("Klany." + Main.this.getClan(p) + ".Base.Yaw");
  20. float pitch = plugin.getConfig().getInt("Klany." + Main.this.getClan(p) + ".Base.Pitch");
  21. World world = Bukkit.getWorld(plugin.getConfig().getString("Klany." + Main.this.getClan(p) + ".Base.World"));
  22. Location loc = new Location(world, x, y, z, yaw, pitch);
  23. p.teleport(loc);
  24. p.sendMessage(Main.this.prefix + "Teleportacja udana");
  25. plugin.getServer().getScheduler().cancelTask(Main.this.taskId);
  26. }
  27. }
  28. }, 60L).getTaskId();
  29. }
  30. else
  31. {
  32. p.sendMessage(this.prefix + "Juz sie teleportujesz spokojnie.");
  33. }
  34. }
  35. else {
  36. p.sendMessage(this.prefix + "Ten klan nie ma ustawionej gildijnej bazy !.");
  37. }
  38. }
  39. else {
  40. p.sendMessage(this.prefix + "Nie jestes w klanie.");
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment