Advertisement
Guest User

Untitled

a guest
Aug 29th, 2014
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. public boolean onComand(CommandSender sender, Command command, String label, String[] args){
  2.  
  3. if(sender instanceof Player){
  4.  
  5. Player player = (Player)sender;
  6.  
  7. if(player.hasPermission("neutp.tphere")){
  8.  
  9. if(args.length > 0){
  10.  
  11. Player other = Bukkit.getPlayerExact(args[0]);
  12.  
  13. if(other != null){
  14.  
  15. other.teleport(player);
  16. player.sendMessage(ChatColor.GOLD + "Przeniosles gracza: " + ChatColor.RED + other.getName() + ChatColor.GOLD + "do siebie!");
  17.  
  18. }else{
  19.  
  20. player.sendMessage(ChatColor.RED + "Nie ma takiego gracza!");
  21.  
  22. }
  23.  
  24. }else{
  25.  
  26. player.sendMessage(ChatColor.RED + "Poprawne uzycie: /tphere <nick>.");
  27.  
  28. }
  29.  
  30. }else{
  31.  
  32. player.sendMessage(ChatColor.RED + "Nie masz uprawnien aby wywolac to polecenie." + ChatColor.GRAY + " (neutp.tphere)");
  33.  
  34. }
  35.  
  36. }else{
  37.  
  38. sender.sendMessage(ChatColor.RED + "Nie mozesz wywolac tego polecenia z konsoli!");
  39.  
  40. }
  41.  
  42. return false;
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement