Advertisement
Guest User

teleportatiion

a guest
Jan 21st, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.80 KB | None | 0 0
  1. package eu.mdtraining.utils;
  2.  
  3. import java.util.Random;
  4. import org.bukkit.Location;
  5. import org.bukkit.Sound;
  6. import org.bukkit.entity.Player;
  7. import org.bukkit.potion.PotionEffect;
  8. import org.bukkit.potion.PotionEffectType;
  9.  
  10. public class TeleportationUtil
  11. {
  12. public static void randomTpOld(Player p)
  13. {
  14. Random rand = new Random();
  15. p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 30, 99));
  16. int luck = rand.nextInt(9);
  17. if (luck == 0) {
  18. p.teleport(new Location(p.getWorld(), 156.0D, 102.0D, 732.0D));
  19. }
  20. if (luck == 1) {
  21. p.teleport(new Location(p.getWorld(), 72.0D, 102.0D, 748.0D));
  22. }
  23. if (luck == 2) {
  24. p.teleport(new Location(p.getWorld(), -24.0D, 102.0D, 742.0D));
  25. }
  26. if (luck == 3) {
  27. p.teleport(new Location(p.getWorld(), 123.0D, 100.0D, 540.0D));
  28. }
  29. if (luck == 4) {
  30. p.teleport(new Location(p.getWorld(), 84.0D, 100.0D, 553.0D));
  31. }
  32. if (luck == 5) {
  33. p.teleport(new Location(p.getWorld(), 162.0D, 100.0D, 602.0D));
  34. }
  35. if (luck == 6) {
  36. p.teleport(new Location(p.getWorld(), -45.0D, 102.0D, 655.0D));
  37. }
  38. if (luck == 7) {
  39. p.teleport(new Location(p.getWorld(), 76.0D, 101.0D, 685.0D));
  40. }
  41. if (luck == 8) {
  42. p.teleport(new Location(p.getWorld(), -37.0D, 100.0D, 579.0D));
  43. }
  44. if (luck == 9) {
  45. p.teleport(new Location(p.getWorld(), 20.0D, 100.0D, 543.0D));
  46. }
  47. p.playSound(p.getLocation(), Sound.PORTAL_TRAVEL, 0.1F, 5.0F);
  48. }
  49.  
  50. public static void randomTp(Player p)
  51. {
  52. Random rand = new Random();
  53. p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 30, 99));
  54. int luck = rand.nextInt(9);
  55. if (luck == 0) {
  56. p.teleport(new Location(p.getWorld(), -19957.0D, 75.0D, -19914.0D));
  57. }
  58. if (luck == 1) {
  59. p.teleport(new Location(p.getWorld(), -20032.0D, 77.0D, -19915.0D));
  60. }
  61. if (luck == 2) {
  62. p.teleport(new Location(p.getWorld(), -20084.0D, 76.0D, -19940.0D));
  63. }
  64. if (luck == 3) {
  65. p.teleport(new Location(p.getWorld(), -20088.0D, 74.0D, -20009.0D));
  66. }
  67. if (luck == 4) {
  68. p.teleport(new Location(p.getWorld(), -20068.0D, 75.0D, -20075.0D));
  69. }
  70. if (luck == 5) {
  71. p.teleport(new Location(p.getWorld(), -20010.0D, 74.0D, -20080.0D));
  72. }
  73. if (luck == 6) {
  74. p.teleport(new Location(p.getWorld(), -19964.0D, 75.0D, -20087.0D));
  75. }
  76. if (luck == 7) {
  77. p.teleport(new Location(p.getWorld(), -19916.0D, 75.0D, -20064.0D));
  78. }
  79. if (luck == 8) {
  80. p.teleport(new Location(p.getWorld(), -19916.0D, 75.0D, -20064.0D));
  81. }
  82. if (luck == 9) {
  83. p.teleport(new Location(p.getWorld(), -19972.0D, 75.0D, -19955.0D));
  84. }
  85. p.playSound(p.getLocation(), Sound.PORTAL_TRAVEL, 0.1F, 5.0F);
  86. }
  87. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement