Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
- Random random = new Random();
- Player player = (Player) sender;
- World world = Bukkit.getWorld("world");
- Location randomTeleportLocation = new Location(world, random.nextInt(1000), random.nextInt(1000), random.nextInt(1000), 0, 0);
- if(commandLabel.equalsIgnoreCase("rp")) {
- if(args.length == 0) {
- player.teleport(randomTeleportLocation);
- player.sendMessage(ChatColor.DARK_AQUA + "You have been teleported randomly.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement