package vg.civcraft.mc.prisonpearl.command.commands;

public class FreeAny {

}

@@ -51,30 +51,1332 @@
 s;%0A%0A
-public class FreeAny %7B
+import java.util.LinkedList;%0Aimport java.util.List;%0Aimport java.util.UUID;%0A%0Aimport org.bukkit.ChatColor;%0Aimport org.bukkit.command.CommandSender;%0A%0Aimport vg.civcraft.mc.civmodcore.command.PlayerCommand;%0Aimport vg.civcraft.mc.namelayer.NameAPI;%0Aimport vg.civcraft.mc.prisonpearl.PrisonPearl;%0Aimport vg.civcraft.mc.prisonpearl.PrisonPearlPlugin;%0Aimport vg.civcraft.mc.prisonpearl.managers.PrisonPearlManager;%0A%0Apublic class FreeAny extends PlayerCommand %7B%0A%09public FreeAny(String name) %7B%0A%09%09super(name);%0A%09%09setIdentifier(%22ppfreeany%22);%0A%09%09setDescription(%22Frees the pearl of the given player%22);%0A%09%09setUsage(%22/ppfreeany %3Cplayername%3E%22);%0A%09%09setArguments(1, 1);%0A%09%7D%0A%0A%09public boolean execute(CommandSender sender, String%5B%5D args) %7B%0A%09%09UUID imprisonedID;%0A%09%09PrisonPearlManager manager = PrisonPearlPlugin.getPrisonPearlManager();%0A%09%09PrisonPearl pearl = null;%0A%09%09imprisonedID = NameAPI.getUUID(args%5B0%5D);%0A%09%09if (imprisonedID == null) %7B%0A%09%09%09sender.sendMessage(ChatColor.RED + %22That player does not exist%22);%0A%09%09%09return true;%0A%09%09%7D%0A%09%09if (!manager.isImprisoned(imprisonedID)) %7B%0A%09%09%09sender.sendMessage(ChatColor.RED + %22This player is not imprisoned%22);%0A%09%09%09return true;%0A%09%09%7D%0A%09%09manager.freePearl(pearl, %22Freed by admin%22);%0A%09%09return true;%0A%09%7D%0A%0A%09public List%3CString%3E tabComplete(CommandSender sender, String%5B%5D args) %7B%0A%09%09return new LinkedList%3CString%3E(); // empty list%0A%09%7D
 %0A%0A%7D%0A

Implement freeany command