Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. if(!(sender instanceof Player)) return false;
  2. Player player = (Player)sender;
  3. if(command.getName() == "teleport") {
  4.     if(args.length == 1) {
  5.         List<Player> matches = getServer().matchPlayer(args[0])
  6.         if(matches.size()>1) {
  7.             player.teleport(matches.get(0));
  8.         } else {
  9.             player.sendMessage(target.getName() + " could not be found.");
  10.         }
  11.     } else {
  12.         player.sendMessage("Invalid command.");
  13.     }
  14.     return true;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement