Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean onComand(CommandSender sender, Command command, String label, String[] args){
- if(sender instanceof Player){
- Player player = (Player)sender;
- if(player.hasPermission("neutp.tphere")){
- if(args.length > 0){
- Player other = Bukkit.getPlayerExact(args[0]);
- if(other != null){
- other.teleport(player);
- player.sendMessage(ChatColor.GOLD + "Przeniosles gracza: " + ChatColor.RED + other.getName() + ChatColor.GOLD + "do siebie!");
- }else{
- player.sendMessage(ChatColor.RED + "Nie ma takiego gracza!");
- }
- }else{
- player.sendMessage(ChatColor.RED + "Poprawne uzycie: /tphere <nick>.");
- }
- }else{
- player.sendMessage(ChatColor.RED + "Nie masz uprawnien aby wywolac to polecenie." + ChatColor.GRAY + " (neutp.tphere)");
- }
- }else{
- sender.sendMessage(ChatColor.RED + "Nie mozesz wywolac tego polecenia z konsoli!");
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement