local C=require(script.Parent.Parent.Shared.Util)local O=game:GetService("\080\108\097\121\101\114\115")local V={Transform=function(V)local L=C.MakeFuzzyFinder(O:GetPlayers())return L(V)end;Validate=function(C)return#C>0,"\078\111 \112\108\097\121\101\114 \119\105\116\104 \116\104\097\116 \110\097\109\101 \099\111\117\108\100 \098\101 \102\111\117\110\100\046"end;Autocomplete=function(O)return C.GetNames(O)end;Parse=function(C)return C[1]end;Default=function(C)return C.Name end;ArgumentOperatorAliases={me="\046",all="\042",others="\042\042",random="\063"}}return function(O)O:RegisterType("\112\108\097\121\101\114",V)O:RegisterType("\112\108\097\121\101\114\115",C.MakeListableType(V,{Prefixes="\037 \116\101\097\109\080\108\097\121\101\114\115"}))end
local Util = require(script.Parent.Parent.Shared.Util)
local Players = game:GetService("Players")

local playerType = {
	Transform = function (text)
		local findPlayer = Util.MakeFuzzyFinder(Players:GetPlayers())

		return findPlayer(text)
	end;

	Validate = function (players)
		return #players > 0, "No player with that name could be found."
	end;

	Autocomplete = function (players)
		return Util.GetNames(players)
	end;

	Parse = function (players)
		return players[1]
	end;

	Default = function(player)
		return player.Name
	end;

	ArgumentOperatorAliases = {
		me = ".";
		all = "*";
		others = "**";
		random = "?";
	};
}

return function (cmdr)
	cmdr:RegisterType("player", playerType)
	cmdr:RegisterType("players", Util.MakeListableType(playerType, {
		Prefixes = "% teamPlayers";
	}))
end
