logs.Register("Werkzeuge", false, Color(160, 160, 160))

logs.AddHook("CanTool", function(ply, trace, toolclass)
	local ent = trace.Entity
	if !IsValid(ent) and !ent:IsWorld() then return end
	if !logs.cfg.ToolBlacklist[toolclass] then
		if ply.Logs_LastToolUse then
			if ply.Logs_LastToolUse[1] == toolclass and ply.Logs_LastToolUse[2] > CurTime() then
				return
			end
		end
		ply.Logs_LastToolUse = {toolclass, CurTime() + 0.5}
		logs.Log("Werkzeuge", ply:NameID().." hat das Werkzeug \""..(toolclass or "Unbekannt").."\" auf \""..ent:GetModel().."\" benutzt", {
			["Name"] = ply:Name(),
			["SteamID"]	= ply:SteamID()
		})
	end
end)