/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/TeleportCommand.java
ViewVC logotype

Diff of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/TeleportCommand.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2431 by torben, Fri Jan 27 12:21:27 2012 UTC revision 2432 by torben, Mon Mar 9 13:55:54 2015 UTC
# Line 1  Line 1 
1  package dk.thoerup.bukkit.hoeruputils;  package dk.thoerup.bukkit.hoeruputils;
2    
3  import org.bukkit.ChatColor;  import org.bukkit.ChatColor;
 import org.bukkit.Location;  
 import org.bukkit.World;  
4  import org.bukkit.command.Command;  import org.bukkit.command.Command;
5  import org.bukkit.command.CommandExecutor;  import org.bukkit.command.CommandExecutor;
6  import org.bukkit.command.CommandSender;  import org.bukkit.command.CommandSender;
# Line 29  public class TeleportCommand implements Line 27  public class TeleportCommand implements
27                          return true;                          return true;
28                  }                  }
29    
30                    @SuppressWarnings("deprecation")//user by name is our only option here
31                  Player source = p.getServer().getPlayer( args[0] );                  Player source = p.getServer().getPlayer( args[0] );
   
32                  if (source == null) {                  if (source == null) {
33                          p.sendMessage("Could not find source: " + args[0]);                          p.sendMessage("Could not find source: " + args[0]);
34                          return true;                          return true;
35                  }                  }
36                                    
37                    @SuppressWarnings("deprecation")//user by name is our only option here
38                  Player dest = p.getServer().getPlayer( args[1] );                  Player dest = p.getServer().getPlayer( args[1] );
39                  if (dest == null) {                  if (dest == null) {
40                          p.sendMessage("Could not find destination: " + args[1]);                          p.sendMessage("Could not find destination: " + args[1]);

Legend:
Removed from v.2431  
changed lines
  Added in v.2432

  ViewVC Help
Powered by ViewVC 1.1.20