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){
- Player player = (Player) sender;
- if(commandLabel.equalsIgnoreCase("pandaport")){
- if(args.length == 0){
- player.sendMessage(ChatColor.RED+ "No arguments");
- }else if(args.length == 1){
- Player targetPlayer = player.getServer().getPlayer(args[0]);
- Location targetPlayerLocation = targetPlayer.getLocation();
- player.teleport(targetPlayerLocation);
- }else if (args.length == 2){
- Player targetPlayer = player.getServer().getPlayer(args[0]);
- Player targetPlayer1 = player.getServer().getPlayer(args[1]);
- Location targetPlayerLocation = targetPlayer.getLocation();
- Location targetPlayerLocation1 = targetPlayer1.getLocation();
- targetPlayer.teleport(targetPlayerLocation);
- targetPlayer.sendMessage("Ported to "+player.getName());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement