Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package eu.mdtraining.utils;
- import java.util.Random;
- import org.bukkit.Location;
- import org.bukkit.Sound;
- import org.bukkit.entity.Player;
- import org.bukkit.potion.PotionEffect;
- import org.bukkit.potion.PotionEffectType;
- public class TeleportationUtil
- {
- public static void randomTpOld(Player p)
- {
- Random rand = new Random();
- p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 30, 99));
- int luck = rand.nextInt(9);
- if (luck == 0) {
- p.teleport(new Location(p.getWorld(), 156.0D, 102.0D, 732.0D));
- }
- if (luck == 1) {
- p.teleport(new Location(p.getWorld(), 72.0D, 102.0D, 748.0D));
- }
- if (luck == 2) {
- p.teleport(new Location(p.getWorld(), -24.0D, 102.0D, 742.0D));
- }
- if (luck == 3) {
- p.teleport(new Location(p.getWorld(), 123.0D, 100.0D, 540.0D));
- }
- if (luck == 4) {
- p.teleport(new Location(p.getWorld(), 84.0D, 100.0D, 553.0D));
- }
- if (luck == 5) {
- p.teleport(new Location(p.getWorld(), 162.0D, 100.0D, 602.0D));
- }
- if (luck == 6) {
- p.teleport(new Location(p.getWorld(), -45.0D, 102.0D, 655.0D));
- }
- if (luck == 7) {
- p.teleport(new Location(p.getWorld(), 76.0D, 101.0D, 685.0D));
- }
- if (luck == 8) {
- p.teleport(new Location(p.getWorld(), -37.0D, 100.0D, 579.0D));
- }
- if (luck == 9) {
- p.teleport(new Location(p.getWorld(), 20.0D, 100.0D, 543.0D));
- }
- p.playSound(p.getLocation(), Sound.PORTAL_TRAVEL, 0.1F, 5.0F);
- }
- public static void randomTp(Player p)
- {
- Random rand = new Random();
- p.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 30, 99));
- int luck = rand.nextInt(9);
- if (luck == 0) {
- p.teleport(new Location(p.getWorld(), -19957.0D, 75.0D, -19914.0D));
- }
- if (luck == 1) {
- p.teleport(new Location(p.getWorld(), -20032.0D, 77.0D, -19915.0D));
- }
- if (luck == 2) {
- p.teleport(new Location(p.getWorld(), -20084.0D, 76.0D, -19940.0D));
- }
- if (luck == 3) {
- p.teleport(new Location(p.getWorld(), -20088.0D, 74.0D, -20009.0D));
- }
- if (luck == 4) {
- p.teleport(new Location(p.getWorld(), -20068.0D, 75.0D, -20075.0D));
- }
- if (luck == 5) {
- p.teleport(new Location(p.getWorld(), -20010.0D, 74.0D, -20080.0D));
- }
- if (luck == 6) {
- p.teleport(new Location(p.getWorld(), -19964.0D, 75.0D, -20087.0D));
- }
- if (luck == 7) {
- p.teleport(new Location(p.getWorld(), -19916.0D, 75.0D, -20064.0D));
- }
- if (luck == 8) {
- p.teleport(new Location(p.getWorld(), -19916.0D, 75.0D, -20064.0D));
- }
- if (luck == 9) {
- p.teleport(new Location(p.getWorld(), -19972.0D, 75.0D, -19955.0D));
- }
- p.playSound(p.getLocation(), Sound.PORTAL_TRAVEL, 0.1F, 5.0F);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement