Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean onCommand(CommandSender sender, Command arg1, String arg2, String[] args) {
- Player p = (Player)sender;
- World w = p.getWorld();
- int cordsX = 5000;
- int cordsZ = 5000;
- Random rand = new Random();
- double x = -1 ^ rand.nextInt(cordsX);
- double y = 63.0;
- double z = rand.nextInt(cordsZ);
- Location loc = new Location(w, x, y, z);
- loc.setY((double)(loc.getWorld().getHighestBlockYAt(loc) + 3));
- p.teleport(loc);
- p.playSound(p.getLocation(), Sound.BLOCK_BEACON_ACTIVATE, 3F, 1F);
- p.sendMessage("§8( §a◌ §8) §7Teleported You Randomly!");
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment