Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
  2. Random random = new Random();
  3. Player player = (Player) sender;
  4. World world = Bukkit.getWorld("world");
  5. Location randomTeleportLocation = new Location(world, random.nextInt(1000), random.nextInt(1000), random.nextInt(1000), 0, 0);
  6. if(commandLabel.equalsIgnoreCase("rp")) {
  7. if(args.length == 0) {
  8. player.teleport(randomTeleportLocation);
  9. player.sendMessage(ChatColor.DARK_AQUA + "You have been teleported randomly.");
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement