package me.yonatanx.FreezePlus.cmds;

import me.yonatanx.FreezePlus.FreezePlus;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

/**
 * Created by Yonatan.
 */

public class UnfreezeCmd implements CommandExecutor {
    @Override
    public boolean onCommand(CommandSender commandSender, Command command, String s, String[] strings) {
        if (commandSender.hasPermission("freezeplus.unfreeze")){
            if (strings.length == 1){
                Player player = Bukkit.getPlayer(strings[0]);
                FreezePlus.get().getFreezeManager().unfreezePlayer(player);

                commandSender.sendMessage(ChatColor.GRAY + "You have unfroze " + ChatColor.GOLD + player.getName() + ChatColor.GRAY + ".");
            }
            else commandSender.sendMessage(ChatColor.RED + getSyntax());
        }
        else commandSender.sendMessage(ChatColor.RED + "No permission.");
        return true;
    }

    private String getSyntax(){
        return "/unfreeze <player>";
    }
}

@@ -499,24 +499,26 @@
 strings) %7B%0D%0A
+%0D%0A
         if (
@@ -517,16 +517,17 @@
     if (
+!
 commandS
@@ -568,32 +568,141 @@
 freeze%22))%7B%0D%0A    
+        commandSender.sendMessage(ChatColor.RED + %22No permission.%22);%0D%0A            return true;%0D%0A        %7D%0D%0A%0D%0A
         if (stri
@@ -712,17 +712,17 @@
 .length 
-=
+!
 = 1)%7B%0D%0A 
@@ -720,32 +720,132 @@
 != 1)%7B%0D%0A        
+    commandSender.sendMessage(ChatColor.RED + getSyntax());%0D%0A            return true;%0D%0A        %7D%0D%0A%0D%0A
         Player p
@@ -879,32 +879,24 @@
 rings%5B0%5D);%0D%0A
-        
         Free
@@ -956,23 +956,16 @@
 );%0D%0A
-%0D%0A     
         
    c
@@ -952,35 +952,32 @@
 ayer);%0D%0A        
-   
 commandSender.se
@@ -1089,181 +1089,8 @@
 );%0D%0A
-            %7D%0D%0A            else commandSender.sendMessage(ChatColor.RED + getSyntax());%0D%0A        %7D%0D%0A        else commandSender.sendMessage(ChatColor.RED + %22No permission.%22);
 %0D%0A  

Update UnfreezeCmd.java